From b4c34ec9c6c8ee7448c122848c1e5437ceb51e99 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Mon, 15 Jul 2019 13:06:41 +0200 Subject: Fix accounting of invisible players in \!listplayers --- src/game/g_admin.c | 4 ++-- 1 file 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 ) ); -- cgit