From 1088123ccd5e0adac54f4efa2efd7293b37a8358 Mon Sep 17 00:00:00 2001 From: KOSMOGOR Date: Fri, 9 Oct 2026 00:43:16 +0300 Subject: [PATCH] update: startAmbush() also mutes sack sound --- .../src/classes/features/other/StartAmbush.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/isaacscript-common/src/classes/features/other/StartAmbush.ts b/packages/isaacscript-common/src/classes/features/other/StartAmbush.ts index 94019b5cc..de741e638 100644 --- a/packages/isaacscript-common/src/classes/features/other/StartAmbush.ts +++ b/packages/isaacscript-common/src/classes/features/other/StartAmbush.ts @@ -1,4 +1,5 @@ -import { SackSubType } from "isaac-typescript-definitions"; +import { SackSubType, SoundEffect } from "isaac-typescript-definitions"; +import { sfxManager } from "../../../core/cachedClasses"; import { Exported } from "../../../decorators"; import { ISCFeature } from "../../../enums/ISCFeature"; import { removeEntities } from "../../../functions/entities"; @@ -42,6 +43,7 @@ export class StartAmbush extends Feature { player.Position, SACK_SEED_THAT_SPAWNS_TWO_COINS, ); + const wasPlayingSound = sfxManager.IsPlaying(SoundEffect.SHELL_GAME); // The sack will play the "Appear" animation and the player will not be able to interact with it // while this is occurring. By stopping the animation, it will transition to the "Idle" @@ -54,6 +56,9 @@ export class StartAmbush extends Feature { if (futureSack === undefined) { return; } + if (!wasPlayingSound) { + sfxManager.Stop(SoundEffect.SHELL_GAME); + } futureSack.Remove(); const sackPtrHash = GetPtrHash(futureSack);