From: Mario <mario@smbclan.net>
Date: Sun, 19 Jun 2016 11:36:33 +0000 (+1000)
Subject: Fix double multiplier on damage to vehicles from weapons like thew rifle
X-Git-Tag: xonotic-v0.8.2~775
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=18604162243691b52b921328516ae0424c0fa8ee;p=xonotic%2Fxonotic-data.pk3dir.git

Fix double multiplier on damage to vehicles from weapons like thew rifle
---

diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc
index 9ef5e4604c..c7a46d4825 100644
--- a/qcsrc/common/vehicles/sv_vehicles.qc
+++ b/qcsrc/common/vehicles/sv_vehicles.qc
@@ -591,20 +591,15 @@ void vehicles_damage(entity this, entity inflictor, entity attacker, float damag
 	// WEAPONTODO
 	if(DEATH_ISWEAPON(deathtype, WEP_VORTEX))
 		damage *= autocvar_g_vehicles_vortex_damagerate;
-
-	if(DEATH_ISWEAPON(deathtype, WEP_MACHINEGUN))
+	else if(DEATH_ISWEAPON(deathtype, WEP_MACHINEGUN))
 		damage *= autocvar_g_vehicles_machinegun_damagerate;
-
-	if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
+	else if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
 		damage *= autocvar_g_vehicles_rifle_damagerate;
-
-	if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER))
+	else if(DEATH_ISWEAPON(deathtype, WEP_VAPORIZER))
 		damage *= autocvar_g_vehicles_vaporizer_damagerate;
-
-	if(DEATH_ISWEAPON(deathtype, WEP_SEEKER))
+	else if(DEATH_ISWEAPON(deathtype, WEP_SEEKER))
 		damage *= autocvar_g_vehicles_tag_damagerate;
-
-	if(DEATH_WEAPONOF(deathtype) != WEP_Null)
+	else if(DEATH_WEAPONOF(deathtype) != WEP_Null)
 		damage *= autocvar_g_vehicles_weapon_damagerate;
 
 	this.enemy = attacker;