From 7bf6dbfed060ded89da8c53ae8b712e62bd19da2 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 4 Apr 2015 23:32:01 +0200 Subject: Fix a bug in G_SendPublicServerCommand. --- src/game/g_active.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game/g_active.c') diff --git a/src/game/g_active.c b/src/game/g_active.c index 7148af0..02cb6e9 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -2223,14 +2223,14 @@ void G_SendPublicServerCommand( int clientNum, const char *cmd ) int i; gclient_t *client; - for( i = 0; i < level.maxclients ; i++ ) + for( i = 0; i < level.maxclients; i++ ) { client = level.clients + i; if( client->pers.connected != CON_CONNECTED ) continue; - if( client->ps.clientNum == clientNum ) + if( i == clientNum ) goto send; if( client->sess.spectatorState == SPECTATOR_NOT ) @@ -2240,7 +2240,7 @@ void G_SendPublicServerCommand( int clientNum, const char *cmd ) continue; send: - trap_SendServerCommand( client->ps.clientNum, cmd ); + trap_SendServerCommand( i, cmd ); } } -- cgit