From ca03f2b7779b5fdf9ad3fc18353190cc22aca476 Mon Sep 17 00:00:00 2001 From: Oni Date: Thu, 12 Jan 2023 00:35:08 +0000 Subject: [PATCH] Merge branch 'bot-realtime-fix' into 'master' Bot `realtime` fix See merge request KartKrew/Kart!874 --- src/p_mobj.c | 6 +++++- src/p_user.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 967fca624..ed44bc4a5 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11155,7 +11155,11 @@ void P_SpawnPlayer(INT32 playernum) mobj->health = 1; p->playerstate = PST_LIVE; - p->realtime = leveltime; + if (!p->exiting || !p->realtime) + { + p->realtime = leveltime; + } + p->followitem = skins[p->skin].followitem; //awayview stuff diff --git a/src/p_user.c b/src/p_user.c index dd4d5bcd3..b603196d6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2661,7 +2661,7 @@ static void P_DeathThink(player_t *player) } // Keep time rolling - if (!(exitcountdown && !racecountdown) && !(player->exiting || mapreset) && !(player->pflags & PF_NOCONTEST) && !stoppedclock) + if (!(player->exiting || mapreset) && !(player->pflags & PF_NOCONTEST) && !stoppedclock) { if (leveltime >= starttime) { @@ -4288,7 +4288,7 @@ void P_PlayerThink(player_t *player) } // Synchronizes the "real" amount of time spent in the level. - if (!(exitcountdown && !racecountdown) && !(player->exiting || mapreset) && !(player->pflags & PF_NOCONTEST) && !stoppedclock) + if (!(player->exiting || mapreset) && !(player->pflags & PF_NOCONTEST) && !stoppedclock) { if (leveltime >= starttime) {