Don't antigrief players alone in local freeplay

This commit is contained in:
AJ Martinez 2022-10-29 15:37:45 -07:00
parent 17bde07bda
commit 144795c22c

View file

@ -8518,7 +8518,17 @@ void P_PlayerThink(player_t *player)
if (netgame && cv_antigrief.value != 0 && G_RaceGametype())
{
if (!player->spectator && !player->exiting && !(player->pflags & PF_TIMEOVER))
INT32 i;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator)
continue;
if (&players[i] == player)
continue;
break;
}
if (i < MAXPLAYERS && !player->spectator && !player->exiting && !(player->pflags & PF_TIMEOVER))
{
const tic_t griefval = cv_antigrief.value * TICRATE;
const UINT8 n = player - players;