From af970b091ec9e6ddb387eab91d460ea77a11d349 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 26 Jul 2020 12:43:32 +0200 Subject: [PATCH] - set proper game state after ending the level summary screen. Fixes #20. --- source/core/screenjob.cpp | 6 +++++- source/games/duke/src/premap.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/core/screenjob.cpp b/source/core/screenjob.cpp index e080941b8..ae41c9a61 100644 --- a/source/core/screenjob.cpp +++ b/source/core/screenjob.cpp @@ -452,6 +452,10 @@ void RunScreenJobFrame() // we cannot recover from this because we have no completion callback to call. if (!runner) I_Error("Trying to run a non-existent screen job"); auto res = runner->RunFrame(); - if (!res) DeleteScreenJob(); + if (!res) + { + assert(gamestate != GS_INTERMISSION && gamestate != GS_INTRO); + DeleteScreenJob(); + } } diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index be9541b09..060a76bd6 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -1132,7 +1132,7 @@ void exitlevel(void) // Clear potentially loaded per-map ART only after the bonus screens. artClearMapArt(); - + gamestate = GS_LEVEL; if (endofgame) { ud.eog = 0;