From 71d49bcc3b9c47a171a9e661130ac38be13f8e4b Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 15 Dec 2021 23:21:43 +0000 Subject: [PATCH] With Sal's feedback, make nospectategrief get set 20 seconds into the map, not on lap 3 --- src/k_kart.c | 21 +++++++++++---------- src/p_spec.c | 4 ---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index a8b3374c..02a3c77e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -6316,10 +6316,6 @@ void K_CheckSpectateStatus(void) if (numingame < 2 || leveltime < starttime || mapreset) continue; - // DON'T allow if the match is 20 seconds in - if (leveltime > (starttime + 20*TICRATE)) - return; - // DON'T allow if the race is on the second lap if (G_RaceGametype() && players[i].laps) return; @@ -6335,16 +6331,21 @@ void K_CheckSpectateStatus(void) respawnlist[numjoiners++] = i; } + // 1.4: prevent last lap jerkitude + if (gamestate == GS_LEVEL) + { + if (!numingame) // but allow empty netgames to recover + nospectategrief = 0; + else if (!nospectategrief && (leveltime > (starttime + 20*TICRATE))) + nospectategrief = numingame; + if (nospectategrief > 1) + return; + } + // literally zero point in going any further if nobody is joining if (!numjoiners) return; - // 1.4: prevent last lap jerkitude - if (!numingame) // but allow empty netgames to recover - nospectategrief = 0; - if (nospectategrief > 1) - return; - // Organize by spectate wait timer #if 0 if (cv_ingamecap.value) diff --git a/src/p_spec.c b/src/p_spec.c index 67d05f2d..4c457b91 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4311,10 +4311,6 @@ DoneSection2: // Play the starpost sound for 'consistency' // S_StartSound(player->mo, sfx_strpst); - // Figure out how many are playing on the last lap, to prevent spectate griefing - if (!nospectategrief && player->laps >= (UINT8)(cv_numlaps.value - 1)) - nospectategrief = nump; - thwompsactive = true; // Lap 2 effects player->grieftime = 0; }