summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIronClawTrem <louie.nutman@gmail.com>2020-03-14 17:48:45 +0000
committerIronClawTrem <louie.nutman@gmail.com>2020-03-14 17:48:45 +0000
commitb45e37aa3a650272b70583d0b9747f1ee3b5ab0e (patch)
tree60e7ef347335c513709a331b243f8373d3b22a28
parentba86994b7e67a4251214904b1f949062764191a6 (diff)
fix segfault in !invisible
-rw-r--r--src/game/g_admin.c4
1 files changed, 2 insertions, 2 deletions
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 ) );