From 84745a87a8c36ab4f87d2514b7fcee6733544504 Mon Sep 17 00:00:00 2001 From: Petr Pudlak Date: Fri, 20 Feb 2015 12:14:54 +0100 Subject: Let acid tubes damage human structures This also includes extending G_SelectiveRadiusDamage to include any enemy buildings. --- src/game/g_combat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game/g_combat.c') diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 4685439..b0e33e4 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1571,8 +1571,10 @@ qboolean G_SelectiveRadiusDamage( vec3_t origin, gentity_t *attacker, float dama points = damage * ( 1.0 - dist / radius ); - if( CanDamage( ent, origin ) && ent->client && - ent->client->ps.stats[ STAT_TEAM ] != team ) + if( CanDamage( ent, origin ) && + ( ( ent->client && ent->client->ps.stats[ STAT_TEAM ] != team ) || + ( ent->s.eType == ET_BUILDABLE && + BG_Buildable( ent->s.modelindex )->team != team ) ) ) { VectorSubtract( ent->r.currentOrigin, origin, dir ); // push the center of mass higher than the origin so players -- cgit