From 6555caca58e426290535e251aa24e6cb479f727d Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 17 Sep 2026 23:13:47 +0000 Subject: [PATCH] Fix pirate cannon impact feedback on player --- src/game-v4.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/game-v4.js b/src/game-v4.js index 8c84dac..0d0b70f 100644 --- a/src/game-v4.js +++ b/src/game-v4.js @@ -416,6 +416,11 @@ class GameScene extends Phaser.Scene { const { x, y } = shot; shot.destroy(); + // Always show projectile impact feedback. Damage is still rate-limited so + // one three-shot broadside cannot register as three hull hits. + this.spawnExplosion(x, y, 0.32); + this.flashShip(this.player, 0xffcccc); + if (this.time.now - this.lastPlayerHitAt < PLAYER_HIT_COOLDOWN_MS) return; this.lastPlayerHitAt = this.time.now; @@ -423,11 +428,7 @@ class GameScene extends Phaser.Scene { if (this.playerHull <= 0) { this.finishGame(); - return; } - - this.spawnExplosion(x, y, 0.28); - this.flashShip(this.player, 0xffcccc); } spawnExplosion(x, y, scale = 1) {