diff options
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 353d3f2b..bf7a01b8 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -233,7 +233,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int if( attacker->client ) killerName = attacker->client->pers.netname; else - killerName = "<non-client>"; + killerName = "<world>"; } else { @@ -241,12 +241,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int killerName = "<world>"; } - if( killer < 0 || killer >= MAX_CLIENTS ) - { - killer = ENTITYNUM_WORLD; - killerName = "<world>"; - } - if( meansOfDeath < 0 || meansOfDeath >= sizeof( modNames ) / sizeof( modNames[0] ) ) // fall back on the number obit = va( "%d", meansOfDeath ); @@ -1363,10 +1357,10 @@ Log deconstruct/destroy events */ void G_LogDestruction( gentity_t *self, gentity_t *actor, int mod ) { - if( !actor || !actor->client ) + if( !actor ) return; - if( actor->client->pers.teamSelection == + if( actor->client && actor->client->pers.teamSelection == BG_Buildable( self->s.modelindex )->team ) { G_TeamCommand( actor->client->ps.stats[ STAT_TEAM ], @@ -1383,5 +1377,5 @@ void G_LogDestruction( gentity_t *self, gentity_t *actor, int mod ) modNames[ mod ], BG_Buildable( self->s.modelindex )->humanName, mod == MOD_DECONSTRUCT ? "deconstructed" : "destroyed", - actor->client->pers.netname ); + actor->client ? actor->client->pers.netname : "<world>" ); } |