Skip to content

Commit

Permalink
- block opening of the menu in the fade out phase of a screenjob and …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
coelckers committed Apr 7, 2021
1 parent 68b7628 commit 58fb938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/core/mainloop.cpp
Expand Up @@ -189,6 +189,7 @@ static void GameTicker()
case ga_newgame:
FX_StopAllSounds();
case ga_newgamenostopsound:
DeleteScreenJob();
newGameStarted = true;
FX_SetReverb(0);
gi->FreeLevelData();
Expand Down
2 changes: 2 additions & 0 deletions source/core/screenjob.cpp
Expand Up @@ -915,6 +915,7 @@ class ScreenJobRunner
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
Expand Down Expand Up @@ -959,6 +960,7 @@ void DeleteScreenJob()
delete runner;
runner = nullptr;
}
twod->SetScreenFade(1);
}

void RunScreenJobFrame()
Expand Down

0 comments on commit 58fb938

Please sign in to comment.