summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 3d57b5b0..f820b2b0 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -990,8 +990,17 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
if( take )
{
targ->health = targ->health - take;
+
+ if( targ->s.eType == ET_BUILDABLE )
+ {
+ if( targ->biteam == BIT_ALIENS )
+ G_AddEvent( targ, EV_ALIEN_BUILDABLE_DAMAGE, 0 );
+ else if( targ->biteam == BIT_HUMANS )
+ G_AddEvent( targ, EV_HUMAN_BUILDABLE_DAMAGE, 0 );
+ }
+
if( targ->client )
- targ->client->ps.stats[STAT_HEALTH] = targ->health;
+ targ->client->ps.stats[ STAT_HEALTH ] = targ->health;
//TA: add to the attackers "account" on the target
if( targ->client && attacker->client &&