With Sal's feedback, make nospectategrief get set 20 seconds into the map, not on lap 3

This commit is contained in:
toaster 2021-12-15 23:21:43 +00:00
parent d398698729
commit 71d49bcc3b
2 changed files with 11 additions and 14 deletions

View file

@ -6316,10 +6316,6 @@ void K_CheckSpectateStatus(void)
if (numingame < 2 || leveltime < starttime || mapreset) if (numingame < 2 || leveltime < starttime || mapreset)
continue; 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 // DON'T allow if the race is on the second lap
if (G_RaceGametype() && players[i].laps) if (G_RaceGametype() && players[i].laps)
return; return;
@ -6335,16 +6331,21 @@ void K_CheckSpectateStatus(void)
respawnlist[numjoiners++] = i; 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 // literally zero point in going any further if nobody is joining
if (!numjoiners) if (!numjoiners)
return; 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 // Organize by spectate wait timer
#if 0 #if 0
if (cv_ingamecap.value) if (cv_ingamecap.value)

View file

@ -4311,10 +4311,6 @@ DoneSection2:
// Play the starpost sound for 'consistency' // Play the starpost sound for 'consistency'
// S_StartSound(player->mo, sfx_strpst); // 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 thwompsactive = true; // Lap 2 effects
player->grieftime = 0; player->grieftime = 0;
} }