From d057b795520b14de1985298e4d433318c0ef168c Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Wed, 27 Dec 2023 15:31:50 -0300 Subject: [PATCH] Update name change delay timer even when fading out to load a level --- src/d_main.c | 8 -------- src/g_game.c | 13 ++++++++++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 4a1d85b04..70ddce5f6 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -708,14 +708,6 @@ void D_SRB2Loop(void) I_UpdateTime(cv_timescale.value); -#if 0 - if (lastwipetic) - { - oldentertics = lastwipetic; - lastwipetic = 0; - } -#endif - // get real tics entertic = I_GetTime(); realtics = entertic - oldentertics; diff --git a/src/g_game.c b/src/g_game.c index cc105edf2..7fd018190 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -80,6 +80,7 @@ static void G_DoWorldDone(void); static void G_CheckPlayerReborn(void); static void G_TickerEnd(void); +static void G_UpdateNameChangeRate(void); char mapmusname[7]; // Music name UINT16 mapmusflags; // Track and reset bit @@ -2615,13 +2616,17 @@ void G_Ticker(boolean run) G_CheckPlayerReborn(); G_TickerEnd(); + G_UpdateNameChangeRate(); } return; } - // Oh my God I hope this doesn't implode anything if (levelstarting || G_GetExitGameFlag()) + { + if (run) + G_UpdateNameChangeRate(); return; + } // Run Marathon Mode in-game timer G_MarathonTicker(); @@ -2774,7 +2779,10 @@ void G_Ticker(boolean run) } if (run) + { G_TickerEnd(); + G_UpdateNameChangeRate(); + } } static void G_TickerEnd(void) @@ -2792,7 +2800,10 @@ static void G_TickerEnd(void) if (camtoggledelay2) camtoggledelay2--; +} +static void G_UpdateNameChangeRate(void) +{ if (gametic % NAMECHANGERATE == 0) { memset(player_name_changes, 0, sizeof player_name_changes);