diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2011-01-26 07:49:06 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:55 +0000 |
commit | ec849f8ccddce98a0372c76823a671633c2be631 (patch) | |
tree | 80fc827f43441a23b3bce4c58d4f7304b471ee72 /src/game | |
parent | 732704968f60c5a282c89a80fbc939fb2ed6af30 (diff) |
* (bug 4885) Show teamkilled buildings as teamkilled in buildlog to differentiate from destroyed by the other team
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 1 | ||||
-rw-r--r-- | src/game/g_combat.c | 13 | ||||
-rw-r--r-- | src/game/g_local.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index f8c43699..87aa8fce 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -2921,6 +2921,7 @@ static char *fates[] = "^3deconstructed^7", "^7replaced^7", "^3destroyed^7", + "^1TEAMKILLED^7", "^7unpowered^7", "removed" }; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 62045177..58ec2683 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1396,7 +1396,18 @@ void G_LogDestruction( gentity_t *self, gentity_t *actor, int mod ) fate = ( actor->client ) ? BF_UNPOWER : BF_AUTO; break; default: - fate = ( actor->client ) ? BF_DESTROY : BF_AUTO; + if( actor->client ) + { + if( actor->client->pers.teamSelection == + BG_Buildable( self->s.modelindex )->team ) + { + fate = BF_TEAMKILL; + } + else + fate = BF_DESTROY; + } + else + fate = BF_AUTO; break; } G_BuildLogAuto( actor, self, fate ); diff --git a/src/game/g_local.h b/src/game/g_local.h index e8575049..d7f5890a 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -501,6 +501,7 @@ typedef enum BF_DECONSTRUCT, BF_REPLACE, BF_DESTROY, + BF_TEAMKILL, BF_UNPOWER, BF_AUTO } buildFate_t; |