From 3414b2458a5a19ef04a137a861c47e3062bd9ce3 Mon Sep 17 00:00:00 2001 From: Admin Date: Fri, 18 Sep 2026 00:52:29 +0000 Subject: [PATCH] Document non-mutating player hit path --- src/game-v4.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game-v4.js b/src/game-v4.js index 2d93ac6..bf17f2e 100644 --- a/src/game-v4.js +++ b/src/game-v4.js @@ -515,8 +515,9 @@ class GameScene extends Phaser.Scene { const damage = normalizePlayerDamage(shot.getData('damage'), PIRATE_SHOT_DAMAGE); - // The Arcade overlap callback only records the collision. Object removal - // and hull mutation happen from the scene update after the physics step. + // The Arcade overlap callback only records the collision. Hull mutation + // happens from the scene update after the physics step; projectile cleanup + // remains on the normal lifetime path to avoid collision-time lifecycle changes. shot.setData('playerHitQueued', true); this.pendingPlayerHits.push({ shot, damage });