Revision | cf89ec430172de906676116f7847214c4c6abded (tree) |
---|---|
Time | 2017-06-26 04:06:11 |
Author | Teemu Piippo <teemu@heck...> |
Commiter | Teemu Piippo |
Fixed: the server could override clientside spectator noclip in some cases, fixes 3164
@@ -4073,6 +4073,10 @@ | ||
4073 | 4073 | // |
4074 | 4074 | void ServerCommands::SetPlayerCheats::Execute() |
4075 | 4075 | { |
4076 | + // [TP] If we're setting the cheats of the consoleplayer and we're spectating, don't let this command modify the noclip cheats. | |
4077 | + if ( player == &players[consoleplayer] && player->bSpectating ) | |
4078 | + cheats = ( cheats & ~( CF_NOCLIP | CF_NOCLIP2 )) | ( player->cheats & ( CF_NOCLIP | CF_NOCLIP2 )); | |
4079 | + | |
4076 | 4080 | player->cheats = cheats; |
4077 | 4081 | } |
4078 | 4082 |