diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-04-11 23:42:48 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-04-11 23:42:48 +0200 |
commit | f97f7bf339f25e9a0e3183cfbd4ebf8222f0fbf4 (patch) | |
tree | 12afbfdc0cf45d4f06409ee3ef02848ee69e181a /src/game/g_weapon.c | |
parent | d9b68a5eb2476ecb80d4eb5cd76c8fc01ffd60ab (diff) |
Make Adv. Dretch able to bite buttons and make it deal appropriate amounts of damage to buildings.
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r-- | src/game/g_weapon.c | 14 |
1 files changed, 9 insertions, 5 deletions
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 ) |