- 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.
This commit is contained in:
Christoph Oelckers 2021-04-07 19:39:48 +02:00
parent 68b7628f56
commit 58fb938aa7
2 changed files with 3 additions and 0 deletions

View file

@ -189,6 +189,7 @@ static void GameTicker()
case ga_newgame: case ga_newgame:
FX_StopAllSounds(); FX_StopAllSounds();
case ga_newgamenostopsound: case ga_newgamenostopsound:
DeleteScreenJob();
newGameStarted = true; newGameStarted = true;
FX_SetReverb(0); FX_SetReverb(0);
gi->FreeLevelData(); gi->FreeLevelData();

View file

@ -915,6 +915,7 @@ public:
startTime = -1; startTime = -1;
clock = 0; clock = 0;
jobs[index].job->fadestate = DScreenJob::fadeout; jobs[index].job->fadestate = DScreenJob::fadeout;
gamestate = GS_INTRO; // block menu and console during fadeout - this can cause timing problems.
actionState = State_Fadeout; actionState = State_Fadeout;
} }
else else
@ -959,6 +960,7 @@ void DeleteScreenJob()
delete runner; delete runner;
runner = nullptr; runner = nullptr;
} }
twod->SetScreenFade(1);
} }
void RunScreenJobFrame() void RunScreenJobFrame()