Overview
What was broken
The previous async PvP pass ("Async PvP — Turn-Batch Multiplayer") left firing unusable:
- Nothing happened when you shot. Async has no live tick loop, so a fired projectile was never simulated past the fire tick — it sat in-flight in the post-turn world and leaked into the next player's turn. The replay ended at the launch frame, so the player never saw the rocket fly or explode.
- The worm teleported back. Firing invalidated the live movement preview, snapping the worm from its moved position back to the turn-start snapshot position.
- The aim cone stayed in place. The trajectory cone was computed from the frozen turn-start snapshot position, not the live preview position, so it didn't follow the worm as it walked.
Fixes applied
1. Resolve projectiles in-turn FIXED
GameSession.ProcessBatch now steps idle ticks after the player's input ticks until in-flight projectiles resolve (capped at ~5s), before OnTurnBoundary/AdvanceTurn. This mirrors sync mode's 90-tick weapon cooldown. The resolution frames are appended to the replay, so both players see the shot fly and land, and the projectile no longer leaks into the next turn.
2. Aim cone follows the worm FIXED
BuildTrajectoryEnvelopes now origins the trajectory cone at the movement-preview position when the preview is active, so the aim follows the worm as the player walks it.
3. No more teleport-back on fire FIXED
MovementPreview now freezes (keeps its last position, stops stepping) on non-movement actions instead of clearing the position, so the worm stays where the player moved it when they fire.
4. Fire auto-submits the turn FIXED
The moment the player fires, the turn batch auto-submits (once per turn via _firedThisTurn), so the replay — now extended with the projectile's flight — plays immediately. This gives PvE-like feedback: you fire, you see the shot, the turn ends.
Match flow exercised
Screenshots
D for ~0.9s: the live movement preview walks the worm to the right in real time, and the aim trajectory cone follows it (no longer pinned to the start spot).
Enter to fire → the turn auto-submitted → the replay plays, showing the recorded move and the Rocket in flight (post-fire resolution frames).
SubmitTurnBatch ticks=175 accepted=True, zero maximum message size disconnections.