From b45e37aa3a650272b70583d0b9747f1ee3b5ab0e Mon Sep 17 00:00:00 2001 From: IronClawTrem Date: Sat, 14 Mar 2020 17:48:45 +0000 Subject: fix segfault in !invisible --- src/game/g_admin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 923984f..8f6e564 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -7517,7 +7517,7 @@ qboolean G_admin_invisible( gentity_t *ent, int skiparg ) // Make the player invisible G_ChangeTeam( ent, PTE_NONE ); ent->client->sess.invisible = qtrue; - ClientUserinfoChanged( ent->client->pers.connection->clientNum, qfalse ); + ClientUserinfoChanged( ent-g_entities, qfalse ); G_admin_namelog_update( ent->client, qtrue ); trap_SendServerCommand( -1, va( "print \"%s" S_COLOR_WHITE " disconnected\n\"", ent->client->pers.netname ) ); } @@ -7525,7 +7525,7 @@ qboolean G_admin_invisible( gentity_t *ent, int skiparg ) { // Make the player visible ent->client->sess.invisible = qfalse; - ClientUserinfoChanged( ent->client->pers.connection->clientNum, qfalse ); + ClientUserinfoChanged( ent-g_entities, qfalse ); G_admin_namelog_update( ent->client, qfalse ); trap_SendServerCommand( -1, va( "print \"%s" S_COLOR_WHITE " connected\n\"", ent->client->pers.netname ) ); trap_SendServerCommand( -1, va( "print \"%s" S_COLOR_WHITE " entered the game\n\"", ent->client->pers.netname ) ); -- cgit