Skip to content

Commit

Permalink
E
Browse files Browse the repository at this point in the history
Fixed a funny bug where you could crash any editor by opening an editor and immediately exiting before the editor song starts
The note offset state now changes to the correct menu music when you exit
  • Loading branch information
JordanSantiagoYT committed Feb 25, 2024
1 parent 24bd57f commit f6dafff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/editors/EditingMusic.hx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class EditingMusic
}
public function destroy()
{
music.destroy();
if (startTimer != null) startTimer.cancel();
if (music != null) music.destroy();
reset();
}
public function playMusic(time:Float = 0)
Expand Down
2 changes: 1 addition & 1 deletion source/options/NoteOffsetState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class NoteOffsetState extends MusicBeatState
persistentUpdate = false;
CustomFadeTransition.nextCamera = camOther;
FlxG.switchState(options.OptionsState.new);
FlxG.sound.playMusic(Paths.music('freakyMenu'), 1, true);
FlxG.sound.playMusic(Paths.music('freakyMenu-' + ClientPrefs.daMenuMusic), 1, true);
FlxG.mouse.visible = false;
}

Expand Down

0 comments on commit f6dafff

Please sign in to comment.