mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Fix 64-bit build-using admins not being able to kick players besides themselves, by not checking sendingsavegame[] code at all if not the server
it turns out playernode[pn] is typically 255 in the above situation, so sendingsavegame[playernode[pn]] goes out of bounds ...but goodness knows why 32-bit builds didn't suffer the same bug, seems to have been pure luck
This commit is contained in:
parent
ae14fd2f85
commit
aee8dcdff8
1 changed files with 9 additions and 6 deletions
|
@ -2650,13 +2650,16 @@ static void Command_Kick(void)
|
||||||
if (pn == -1 || pn == 0)
|
if (pn == -1 || pn == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Special case if we are trying to kick a player who is downloading the game state:
|
if (server)
|
||||||
// trigger a timeout instead of kicking them, because a kick would only
|
|
||||||
// take effect after they have finished downloading
|
|
||||||
if (sendingsavegame[playernode[pn]])
|
|
||||||
{
|
{
|
||||||
Net_ConnectionTimeout(playernode[pn]);
|
// Special case if we are trying to kick a player who is downloading the game state:
|
||||||
return;
|
// trigger a timeout instead of kicking them, because a kick would only
|
||||||
|
// take effect after they have finished downloading
|
||||||
|
if (sendingsavegame[playernode[pn]])
|
||||||
|
{
|
||||||
|
Net_ConnectionTimeout(playernode[pn]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITESINT8(p, pn);
|
WRITESINT8(p, pn);
|
||||||
|
|
Loading…
Reference in a new issue