Document non-mutating player hit path

This commit is contained in:
Admin 2026-09-18 00:52:29 +00:00
parent 19ce095e7f
commit 3414b2458a

View File

@ -515,8 +515,9 @@ class GameScene extends Phaser.Scene {
const damage = normalizePlayerDamage(shot.getData('damage'), PIRATE_SHOT_DAMAGE); const damage = normalizePlayerDamage(shot.getData('damage'), PIRATE_SHOT_DAMAGE);
// The Arcade overlap callback only records the collision. Object removal // The Arcade overlap callback only records the collision. Hull mutation
// and hull mutation happen from the scene update after the physics step. // 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); shot.setData('playerHitQueued', true);
this.pendingPlayerHits.push({ shot, damage }); this.pendingPlayerHits.push({ shot, damage });