Skip to content

Commit

Permalink
Make Adv. Dretch able to bite buttons and make it deal appropriate am…
Browse files Browse the repository at this point in the history
…ounts of damage to buildings.
  • Loading branch information
enneract committed Apr 11, 2015
1 parent d9b68a5 commit f97f7bf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/game/g_weapon.c
Expand Up @@ -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 )
Expand Down

0 comments on commit f97f7bf

Please sign in to comment.