diff options
author | M. Kristall <mkpdev@gmail.com> | 2011-09-25 19:12:09 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:18:14 +0000 |
commit | 37a60fa83a2e5a17ee1b3be56f98479a06b810eb (patch) | |
tree | 8ac991e2dd4619feae213354b766d119c7dde4f7 /src/game | |
parent | 9277c143f248a7a94c9645162217674abfcbf840 (diff) |
* Unregister commands advertised by the server when disconnecting
Now that builtin commands can't be removed, this should be safe
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_cmds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 8461981f..b8e90239 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -3246,6 +3246,10 @@ void G_ListCommands( gentity_t *ent ) for( i = 0; i < numCmds; i++ ) { + // never advertise cheats + if( cmds[ i ].cmdFlags & CMD_CHEAT ) + continue; + len = strlen( cmds[ i ].cmdName ) + 1; if( len + outlen >= sizeof( out ) - 1 ) { |