Document non-mutating player hit path
This commit is contained in:
parent
19ce095e7f
commit
3414b2458a
@ -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 });
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user