From d359e5aa49468de723aa9d063834b23c2b48bca2 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:52:50 -0700 Subject: [PATCH] Revert "fix duplicate calls between playstate and musicbeatstate (#190)" (#192) This reverts commit 174b218200a94fedfe9a246626b28c54d883e9cc. --- source/funkin/game/PlayState.hx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 66ec1baf..005e38a2 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1015,6 +1015,7 @@ class PlayState extends MusicBeatState inst.resume(); vocals.resume(); } + scripts.call("onFocus"); updateDiscordPresence(); super.onFocus(); } @@ -1026,6 +1027,7 @@ class PlayState extends MusicBeatState inst.pause(); vocals.pause(); } + scripts.call("onFocusLost"); updateDiscordPresence(); super.onFocusLost(); } @@ -1579,15 +1581,23 @@ class PlayState extends MusicBeatState @:dox(hide) override function stepHit(curStep:Int) + { super.stepHit(curStep); + scripts.call("stepHit", [curStep]); + } @:dox(hide) override function measureHit(curMeasure:Int) + { super.measureHit(curMeasure); + scripts.call("measureHit", [curMeasure]); + } @:dox(hide) override function beatHit(curBeat:Int) { + super.beatHit(curBeat); + if (camZoomingInterval < 1) camZoomingInterval = 1; if (Options.camZoomOnBeat && camZooming && FlxG.camera.zoom < maxCamZoom && curBeat % camZoomingInterval == 0) { @@ -1601,7 +1611,7 @@ class PlayState extends MusicBeatState iconP1.updateHitbox(); iconP2.updateHitbox(); - super.beatHit(curBeat); + scripts.call("beatHit", [curBeat]); } // GETTERS & SETTERS