fix: freeze when restarting a video cutscene.

This commit is contained in:
MAJigsaw77
2025-06-12 12:47:36 +03:00
parent 4fa12a3486
commit 1a07e082c9
3 changed files with 3 additions and 0 deletions
@@ -150,6 +150,7 @@ class VideoCutscene
{
vid.zIndex = 0;
vid.active = false;
vid.bitmap.onEncounteredError.add((_) -> finishVideo(0.5));
vid.bitmap.onEndReached.add(finishVideo.bind(0.5));
vid.cameras = [PlayState.instance.camCutscene];
@@ -90,6 +90,7 @@ class IntroSubState extends MusicBeatSubState
{
vid.zIndex = 0;
vid.active = false;
vid.bitmap.onEncounteredError.add((_) -> onLightsEnd());
vid.bitmap.onEndReached.add(onLightsEnd);
vid.bitmap.onFormatSetup.add(() -> {
vid.setGraphicSize(FlxG.initialWidth, FlxG.initialHeight);
+1
View File
@@ -97,6 +97,7 @@ class AttractState extends MusicBeatState
{
vid.zIndex = 0;
vid.active = false;
vid.bitmap.onEncounteredError.add((_) -> onAttractEnd());
vid.bitmap.onEndReached.add(onAttractEnd);
vid.bitmap.onFormatSetup.add(() -> {
vid.setGraphicSize(FlxG.initialWidth, FlxG.initialHeight);