From 18604162243691b52b921328516ae0424c0fa8ee Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 19 Jun 2016 21:36:33 +1000 Subject: [PATCH] Fix double multiplier on damage to vehicles from weapons like thew rifle --- qcsrc/common/vehicles/sv_vehicles.qc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 9ef5e4604..c7a46d482 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; -- 2.39.2