From f97f7bf339f25e9a0e3183cfbd4ebf8222f0fbf4 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 11 Apr 2015 23:42:48 +0200 Subject: Make Adv. Dretch able to bite buttons and make it deal appropriate amounts of damage to buildings. --- src/game/g_weapon.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/game/g_weapon.c') diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index d1f7694..085b933 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -1193,15 +1193,19 @@ qboolean CheckVenomAttack2( gentity_t *ent ) if( traceEnt->health <= 0 ) return qfalse; - if( !traceEnt->client && !( traceEnt->s.eType == ET_BUILDABLE ) ) - return qfalse; - - // only allow bites to work against buildings as they are constructing + // only allow bites to work against buildings as they are constructing if( traceEnt->s.eType == ET_BUILDABLE ) { if( traceEnt->buildableTeam == TEAM_ALIENS ) return qfalse; - damage = 6; + + if ( !( traceEnt->s.modelindex == BA_H_MGTURRET || traceEnt->s.modelindex == BA_H_MGTURRET2 || traceEnt->s.modelindex == BA_H_TESLAGEN || !traceEnt->spawned ) ) + damage = (int)(damage * g_DretchBuildingDamage.value); + else + damage = (int)(damage * g_DretchTurretDamage.value); + + if (damage <= 0) + return qfalse; } if( traceEnt->client ) -- cgit