From a3050063cd37cb2a78c3ce43b139b83c3a0ed1e3 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 27 Nov 2019 09:03:21 +0000 Subject: [PATCH] Resolve #378, because I knew as soon as I saw that issue name that it was my fault. --- src/p_tick.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/p_tick.c b/src/p_tick.c index 60a776cbc..237d6b593 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -476,11 +476,14 @@ static inline void P_DoSpecialStageStuff(void) // Count up the rings of all the players and see if // they've collected the required amount. for (i = 0; i < MAXPLAYERS; i++) - if (playeringame[i] && players[i].nightstime) + if (playeringame[i]) { tic_t oldnightstime = players[i].nightstime; countspheres += players[i].spheres; + if (!oldnightstime) + continue; + // If in water, deplete timer 6x as fast. if (players[i].mo->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER) && !(players[i].powers[pw_shield] & SH_PROTECTWATER)) players[i].nightstime -= 5;