From 6a2088d0eabf9df6568836b42d0dc436e19ecf17 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Sun, 19 Oct 2014 05:42:30 +0300 Subject: Dretches can damage turrets and buildings. Amount of damage compared to base damage is controlled by cvars. --- src/game/g_weapon.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/game/g_weapon.c') diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 740ab32..bbc4e08 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -1022,14 +1022,16 @@ qboolean CheckVenomAttack( gentity_t *ent ) // only allow bites to work against buildings as they are constructing if( traceEnt->s.eType == ET_BUILDABLE ) { + if( traceEnt->buildableTeam == TEAM_ALIENS ) + return qfalse; if ( !( traceEnt->s.modelindex == BA_H_MGTURRET || traceEnt->s.modelindex == BA_H_MGTURRET2 || traceEnt->s.modelindex == BA_H_TESLAGEN || !traceEnt->spawned ) ) - return qfalse; + damage = (int)(damage * g_DretchBuildingDamage.value); + else + damage = (int)(damage * g_DretchTurretDamage.value); - if( traceEnt->buildableTeam == TEAM_ALIENS ) + if (damage <= 0) return qfalse; - - damage = 3; } if( traceEnt->client ) -- cgit