]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix double multiplier on damage to vehicles from weapons like thew rifle
authorMario <mario@smbclan.net>
Sun, 19 Jun 2016 11:36:33 +0000 (21:36 +1000)
committerMario <mario@smbclan.net>
Sun, 19 Jun 2016 11:36:33 +0000 (21:36 +1000)
qcsrc/common/vehicles/sv_vehicles.qc

index 9ef5e4604c83170d35c6fec77b7e9b4eeacd3e9e..c7a46d482557960ddffbf4d6472ecc4a92ae1642 100644 (file)
@@ -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;