Attempt fix for players being able to get admin

Tyron said there is an "outstanding base game bug where an authenticated player can ghost and a new player will log in on their node, inheriting admin" ... wow that's terrifying! Let's reset admin for every  instance of CL_ClearPlayer instead of only in CL_RemovePlayer.
This commit is contained in:
Sally Coolatta 2022-06-07 19:22:44 -04:00
parent 04ec0b1ffd
commit 55cbc41017

View file

@ -2291,6 +2291,8 @@ void CL_ClearPlayer(INT32 playernum)
splitscreen_original_party_size[playernum] = 0;
memset(&players[playernum], 0, sizeof (player_t));
RemoveAdminPlayer(playernum); // don't stay admin after you're gone
}
//
@ -2348,11 +2350,6 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
player_name_changes[playernum] = 0;
if (IsPlayerAdmin(playernum))
{
RemoveAdminPlayer(playernum); // don't stay admin after you're gone
}
LUA_InvalidatePlayer(&players[playernum]);
K_CheckBumpers();