From cf7b4d826a82d561b6981dd1fdce106e57fbc234 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Sun, 26 Jan 2020 23:46:07 -0300 Subject: [PATCH 1/2] Remove redundancy --- src/g_game.c | 4 ++++ src/p_setup.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index f5d7cd2fb..8383782cb 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1941,6 +1941,10 @@ boolean G_IsTitleCardAvailable(void) if (gametyperules & GTR_NOTITLECARD) return false; + // The current level has no name. + if (!mapheaderinfo[gamemap-1]->lvlttl[0]) + return false; + // The title card is available. return true; } diff --git a/src/p_setup.c b/src/p_setup.c index 2b0a5efa3..c291dc7c3 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3684,8 +3684,7 @@ boolean P_LoadLevel(boolean fromnetsave) return true; // If so... - if ((!(mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)) && (*mapheaderinfo[gamemap-1]->lvlttl != '\0')) - G_PreLevelTitleCard(); + G_PreLevelTitleCard(); return true; } From 1774ba22b6ea77fbc0442573d08e00439e9b6fbb Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Sun, 26 Jan 2020 23:50:36 -0300 Subject: [PATCH 2/2] Fix title card not showing up at all if focus lost --- src/st_stuff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/st_stuff.c b/src/st_stuff.c index 4676506fc..d99d564c8 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1278,13 +1278,15 @@ void ST_preDrawTitleCard(void) // void ST_runTitleCard(void) { + boolean run = !(paused || P_AutoPause()); + if (!G_IsTitleCardAvailable()) return; if (lt_ticker >= (lt_endtime + TICRATE)) return; - if (!(paused || P_AutoPause())) + if (run || (lt_ticker < PRELEVELTIME)) { // tick lt_ticker++;