mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 20:01:04 +00:00
Don't antigrief players alone in local freeplay
This commit is contained in:
parent
17bde07bda
commit
144795c22c
1 changed files with 11 additions and 1 deletions
12
src/p_user.c
12
src/p_user.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue