summaryrefslogtreecommitdiff
path: root/src/game/g_weapon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r--src/game/g_weapon.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 63e80be..11d4892 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1136,7 +1136,9 @@ static void G_CreateNewZap( gentity_t *creator, gentity_t *target )
if( target->health > 0 )
{
G_Damage( target, creator, creator, forward,
- target->s.origin, LEVEL2_AREAZAP_DMG,
+ target->s.origin, LEVEL2_AREAZAP_DMG *
+ ( ( target->s.eType == ET_BUILDABLE )
+ ? LEVEL2_AREAZAP_DMG_MOD : 1.0f ),
DAMAGE_NO_KNOCKBACK | DAMAGE_NO_LOCDAMAGE,
MOD_LEVEL2_ZAP );
@@ -1145,8 +1147,9 @@ static void G_CreateNewZap( gentity_t *creator, gentity_t *target )
for( i = 1; i < zap->numTargets; i++ )
{
G_Damage( zap->targets[ i ], target, zap->creator, forward, target->s.origin,
- LEVEL2_AREAZAP_DMG * ( 1 - pow( (zap->distances[ i ] /
- LEVEL2_AREAZAP_CHAIN_RANGE ), LEVEL2_AREAZAP_CHAIN_FALLOFF ) ) + 1,
+ ( LEVEL2_AREAZAP_DMG * ( 1 - pow( (zap->distances[ i ] /
+ LEVEL2_AREAZAP_CHAIN_RANGE ) , LEVEL2_AREAZAP_CHAIN_FALLOFF ) ) + 1 )
+ * ( ( zap->targets[ i ]->s.eType == ET_BUILDABLE ) ? LEVEL2_AREAZAP_DMG_MOD : 1.0f ),
DAMAGE_NO_KNOCKBACK | DAMAGE_NO_LOCDAMAGE,
MOD_LEVEL2_ZAP );
}
@@ -1254,7 +1257,8 @@ void areaZapFire( gentity_t *ent )
if( ( traceEnt->client && traceEnt->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) ||
( traceEnt->s.eType == ET_BUILDABLE &&
BG_Buildable( traceEnt->s.modelindex, NULL )->team == TEAM_HUMANS ) &&
- (!BG_Buildable(traceEnt->s.modelindex,NULL)->cuboid||BG_CuboidAttributes(traceEnt->s.modelindex)->zappable))
+ ( !BG_Buildable( traceEnt->s.modelindex, NULL )->cuboid ||
+ BG_CuboidAttributes( traceEnt->s.modelindex )->zappable ) )
{
G_CreateNewZap( ent, traceEnt );
}