diff options
author | M. Kristall <mkpdev@gmail.com> | 2010-02-23 11:12:29 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:26 +0000 |
commit | 69f3a7fece69a9eee18e74f43b898a333d4969c6 (patch) | |
tree | ce3ef4377739154e5dceb6a74fe7753453ae32f3 /src | |
parent | dda5ac8f8914066a33958aa65ef1b4418eeb2b39 (diff) |
* Log non-client entity numbers in Die
* Log destructions not caused by players
Diffstat (limited to 'src')
-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>" ); } |