Skip to content

Commit

Permalink
stun when transitioning to playstate in freeplay to stop bug (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnikTil authored Feb 2, 2025
1 parent 780dac7 commit 9034cd7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/states/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class FreeplayState extends MusicBeatState
// var sickSparkle:FlxSprite;

var _substateIsModifiers = false;
var transToPlayState:Bool = false;

var itemsCamera:FlxCamera;
var hudCamera:FlxCamera;
Expand Down Expand Up @@ -723,7 +724,7 @@ class FreeplayState extends MusicBeatState
scoreText.text = 'PERSONAL BEST: ' + lerpScore + ' (' + ratingSplit.join('.') + '%)';
positionHighscore();

if ((chatBox != null && chatBox.focused) || searchInputWait) {
if ((chatBox != null && chatBox.focused) || searchInputWait || transToPlayState) {
updateTexts(elapsed);
super.update(elapsed);
return;
Expand Down Expand Up @@ -1767,6 +1768,7 @@ class FreeplayState extends MusicBeatState
return;
}
LoadingState.loadAndSwitchState(new PlayState());
transToPlayState = true;
FlxG.autoPause = prevPauseGame;

FlxG.sound.music.volume = 0;
Expand Down

0 comments on commit 9034cd7

Please sign in to comment.