• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revisioncf89ec430172de906676116f7847214c4c6abded (tree)
Time2017-06-26 04:06:11
AuthorTeemu Piippo <teemu@heck...>
CommiterTeemu Piippo

Log Message

Fixed: the server could override clientside spectator noclip in some cases, fixes 3164

Change Summary

Incremental Difference

diff -r e51d0173dda1 -r cf89ec430172 src/cl_main.cpp
--- a/src/cl_main.cpp Sun Jun 18 21:27:47 2017 +0200
+++ b/src/cl_main.cpp Sun Jun 25 22:06:11 2017 +0300
@@ -4073,6 +4073,10 @@
40734073 //
40744074 void ServerCommands::SetPlayerCheats::Execute()
40754075 {
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+
40764080 player->cheats = cheats;
40774081 }
40784082
Show on old repository browser