diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2019-07-15 13:06:41 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2019-07-15 13:06:41 +0200 |
commit | b4c34ec9c6c8ee7448c122848c1e5437ceb51e99 (patch) | |
tree | 3a0925e0a17b1525f1f805ba95f6ec2b6e686fcc | |
parent | 042af2ecd7027b621808289efe2717cfc41b97ee (diff) |
Fix accounting of invisible players in \!listplayers
-rw-r--r-- | src/game/g_admin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index fc078b9..bec9370 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -5703,7 +5703,7 @@ qboolean G_admin_listplayers( gentity_t *ent, int skiparg ) //get amount of invisible players for( i = 0; i < level.maxclients; i++ ) { p = &level.clients[ i ]; - if ( p->sess.invisible == qtrue ) + if( p->pers.connected != CON_DISCONNECTED && p->sess.invisible == qtrue ) invisiblePlayers++; } @@ -5715,7 +5715,7 @@ qboolean G_admin_listplayers( gentity_t *ent, int skiparg ) p = &level.clients[ i ]; // Ignore invisible players - if ( p->sess.invisible == qtrue ) + if( p->pers.connected != CON_DISCONNECTED && p->sess.invisible == qtrue ) continue; Q_strncpyz( t, "S", sizeof( t ) ); |