summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2011-09-25 19:12:09 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:14 +0000
commit37a60fa83a2e5a17ee1b3be56f98479a06b810eb (patch)
tree8ac991e2dd4619feae213354b766d119c7dde4f7 /src/game
parent9277c143f248a7a94c9645162217674abfcbf840 (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.c4
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 )
{