From 391795c6a0c98933fe1e32f02a220245b0911954 Mon Sep 17 00:00:00 2001 From: Brian Fertig Date: Mon, 27 Jul 2026 17:35:35 -0600 Subject: [PATCH] Shell Clean-Up on level changes in Super Kart. --- src/games/superkart/SuperKartGame.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/games/superkart/SuperKartGame.js b/src/games/superkart/SuperKartGame.js index 1654425..024b326 100644 --- a/src/games/superkart/SuperKartGame.js +++ b/src/games/superkart/SuperKartGame.js @@ -519,6 +519,10 @@ export default class SuperKartGame extends Phaser.Scene { this.backdrop = null; for (const s of this.worldSprites ?? []) s.sprite.destroy(); this.worldSprites = null; + // Dynamic sprites (projectiles: seekers/bolts, dropped oil slicks). + // Must be destroyed here or they persist on-screen into the next level. + for (const s of this.dynamicPool ?? []) s.destroy(); + this.dynamicPool = null; this.playerSprite?.destroy(); this.playerSprite = null; this.hud?.destroy();