From 58fb938aa7c3617d1efc2653c23b2c86d008e7f6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Apr 2021 19:39:48 +0200 Subject: [PATCH] - block opening of the menu in the fade out phase of a screenjob and in Exhumed's map/intermission screens. At these places there's some inteference that can bring the engine into an unstable state. This is not a real fix, just a quick workaround. The actual problem requires closer examination why these are the only places where this happens. --- source/core/mainloop.cpp | 1 + source/core/screenjob.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 286f016cb..efdd496d4 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -189,6 +189,7 @@ static void GameTicker() case ga_newgame: FX_StopAllSounds(); case ga_newgamenostopsound: + DeleteScreenJob(); newGameStarted = true; FX_SetReverb(0); gi->FreeLevelData(); diff --git a/source/core/screenjob.cpp b/source/core/screenjob.cpp index 886ade1c1..97413104e 100644 --- a/source/core/screenjob.cpp +++ b/source/core/screenjob.cpp @@ -915,6 +915,7 @@ public: startTime = -1; clock = 0; jobs[index].job->fadestate = DScreenJob::fadeout; + gamestate = GS_INTRO; // block menu and console during fadeout - this can cause timing problems. actionState = State_Fadeout; } else @@ -959,6 +960,7 @@ void DeleteScreenJob() delete runner; runner = nullptr; } + twod->SetScreenFade(1); } void RunScreenJobFrame()