Skip to content

Commit

Permalink
Fixed Weekend 1 crash on 32 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowMario committed Oct 15, 2024
1 parent ed1899b commit 52028ff
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions source/states/stages/PhillyStreets.hx
Original file line number Diff line number Diff line change
Expand Up @@ -207,27 +207,30 @@ class PhillyStreets extends BaseStage
}
}

#if VIDEOS_ALLOWED
var videoEnded:Bool = false;
#else
var videoEnded:Bool = true; //skip videos
#end
function videoCutscene(?videoName:String = null)
{
game.inCutscene = true;
#if VIDEOS_ALLOWED
if(!videoEnded && videoName != null)
{
#if VIDEOS_ALLOWED
game.startVideo(videoName);
game.videoCutscene.finishCallback = game.videoCutscene.onSkip = function()
{
videoEnded = true;
game.videoCutscene = null;
videoCutscene();
};

#else //Make a timer to prevent it from crashing due to sprites not being ready yet.
new FlxTimer().start(0.0, function(tmr:FlxTimer)
{
videoEnded = true;
videoCutscene(videoName);
});
#end
return;
}
#end

if (isStoryMode)
{
Expand Down

0 comments on commit 52028ff

Please sign in to comment.