P2: projectile impacts inferred from disappearance

#52 · closed · 1 comments

View on GitHub ↗

STRML

- Files: `packages/client/src/weapons-view.ts`, app/network event handling. Effects rely on the last observed projectile disappearing, rather than a full authoritative impact record. Shots born and destroyed between snapshots can miss effects; position can be stale and lifetime removal can look like impact. - Repro/QA: fire at a nearby wall and compare solo/network at latency and low snapshot rate; also let a shot expire without striking anything. - Acceptance: impact position, weapon, reason and sequence delivered exactly once; cover direct hit, bounce, timeout and events entirely between snapshots. Continuation context: [docs/ISSUES.md](https://github.com/STRML/clans/blob/main/docs/ISSUES.md).

Comments

STRML

Effects are driven only by authoritative records (direct, bounce, timeout, world) with a monotonic seq, and the disappearance-diff path was deleted: `packages/protocol/src/messages.ts:52-65,117-146` (`EventKind.ProjectileImpact = 7`, protocol 9 to 10), `packages/client/src/app.ts:996-1021,1052-1076`, broadcast ahead of the snapshot-parity gate at `packages/server/src/net.ts:775-779`, test `net.test.ts:1786` plus `e2e/projectile-fidelity.spec.ts` (commit `0c63aeef`). --- Verified against the code at `d1ba6db`, not against the handoff notes, by an automated sweep over this backlog. Reopen if that verification is wrong.