mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Adjust antigrief
Instead of not running for server or admin, run for ALL players, but only avoid *kicking* local or admin players. Fixes a bug where having a non-interacting splitscreen player could take down your server.
This commit is contained in:
parent
c2f9a40593
commit
63a5bed7d8
1 changed files with 5 additions and 6 deletions
11
src/p_user.c
11
src/p_user.c
|
@ -8523,11 +8523,6 @@ void P_PlayerThink(player_t *player)
|
|||
const tic_t griefval = cv_antigrief.value * TICRATE;
|
||||
const UINT8 n = player - players;
|
||||
|
||||
if (n != serverplayer
|
||||
#ifndef DEVELOP
|
||||
&& !IsPlayerAdmin(n)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (player->grieftime > griefval)
|
||||
{
|
||||
|
@ -8536,7 +8531,11 @@ void P_PlayerThink(player_t *player)
|
|||
|
||||
if (server)
|
||||
{
|
||||
if (player->griefstrikes > 2)
|
||||
if ((player->griefstrikes > 2)
|
||||
#ifndef DEVELOP
|
||||
&& !IsPlayerAdmin(n)
|
||||
#endif
|
||||
&& !P_IsLocalPlayer(player)) // P_IsMachineLocalPlayer for DRRR
|
||||
{
|
||||
// Send kick
|
||||
XBOXSTATIC UINT8 buf[2];
|
||||
|
|
Loading…
Reference in a new issue