Skip to content

Commit 2947457

Browse files
elliottcarlsonZamiell
authored andcommitted
fix: remove repeating sound when using pseudo-pause on repentance+
1 parent dc48a27 commit 2947457

File tree

1 file changed

+10
-1
lines changed
  • packages/isaacscript-common/src/classes/features/other

1 file changed

+10
-1
lines changed

packages/isaacscript-common/src/classes/features/other/Pause.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
InputHook,
55
ModCallback,
66
} from "isaac-typescript-definitions";
7+
import { sfxManager } from "../core/cachedClasses";
78
import { VectorZero } from "../../../core/constants";
89
import { Exported } from "../../../decorators";
910
import {
@@ -17,7 +18,7 @@ import { logError } from "../../../functions/log";
1718
import { useActiveItemTemp } from "../../../functions/playerCollectibles";
1819
import { getAllPlayers } from "../../../functions/playerIndex";
1920
import { getTSTLClassName } from "../../../functions/tstlClass";
20-
import { assertDefined } from "../../../functions/utils";
21+
import { assertDefined, isRepentancePlus } from "../../../functions/utils";
2122
import { ReadonlySet } from "../../../types/ReadonlySet";
2223
import { Feature } from "../../private/Feature";
2324
import type { DisableInputs } from "./DisableInputs";
@@ -73,6 +74,10 @@ export class Pause extends Feature {
7374
const firstPlayer = Isaac.GetPlayer();
7475
useActiveItemTemp(firstPlayer, CollectibleType.PAUSE);
7576

77+
if (isRepentancePlus()) {
78+
sfxManager.Stop(SoundEffect.PAUSE_FREEZE);
79+
}
80+
7681
this.stopTearsAndProjectilesFromMoving();
7782
};
7883

@@ -178,6 +183,10 @@ export class Pause extends Feature {
178183
const firstPlayer = Isaac.GetPlayer();
179184
useActiveItemTemp(firstPlayer, CollectibleType.PAUSE);
180185

186+
if (isRepentancePlus()) {
187+
sfxManager.Stop(SoundEffect.PAUSE_FREEZE);
188+
}
189+
181190
const tstlClassName = getTSTLClassName(this);
182191
assertDefined(
183192
tstlClassName,

0 commit comments

Comments
 (0)