1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-02 19:53:15 +00:00

Fix crash on completing song after playtesting (#217)

Co-authored-by: Cameron Taylor <cameron.taylor.ninja@gmail.com>
This commit is contained in:
Eric 2023-11-20 11:27:58 -05:00 committed by GitHub
parent a1da5a5758
commit daf1ba85dc

View file

@ -4515,6 +4515,7 @@ class ChartEditorState extends HaxeUIState
/**
* Fix the current scroll position after exiting the PlayState used when testing.
*/
@:nullSafety(Off)
function resetConductorAfterTest(_:FlxSubState = null):Void
{
moveSongToScrollPosition();
@ -4526,7 +4527,11 @@ class ChartEditorState extends HaxeUIState
var instTargetVolume:Float = instVolumeSlider?.value ?? 1.0;
var vocalTargetVolume:Float = vocalVolumeSlider?.value ?? 1.0;
if (audioInstTrack != null) audioInstTrack.volume = instTargetVolume;
if (audioInstTrack != null)
{
audioInstTrack.volume = instTargetVolume;
audioInstTrack.onComplete = null;
}
if (audioVocalTrackGroup != null) audioVocalTrackGroup.volume = vocalTargetVolume;
}