From ec849f8ccddce98a0372c76823a671633c2be631 Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Wed, 26 Jan 2011 07:49:06 +0000 Subject: * (bug 4885) Show teamkilled buildings as teamkilled in buildlog to differentiate from destroyed by the other team --- src/game/g_admin.c | 1 + src/game/g_combat.c | 13 ++++++++++++- src/game/g_local.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/game') 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; -- cgit