From: Martin Taibr Date: Wed, 25 Oct 2017 13:35:23 +0000 (+0200) Subject: manually fix one if chain X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=30e3f189fa464af219d7cc22669b52c5bf367332;p=xonotic%2Fxonotic-data.pk3dir.git manually fix one if chain --- diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index 018e1a17db..22762bd025 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -149,16 +149,16 @@ bool bumblebee_gunner_frame(entity this, float dt) autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down * -1, autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up, _out * -1, _in, autocvar_g_vehicle_bumblebee_cannon_turnspeed); - if(!forbidWeaponUse(this)) - if(PHYS_INPUT_BUTTON_ATCK(this)) - if(time > gun.attack_finished_single[0]) - if(gun.vehicle_energy >= autocvar_g_vehicle_bumblebee_cannon_cost) - { - gun.vehicle_energy -= autocvar_g_vehicle_bumblebee_cannon_cost; - bumblebee_fire_cannon(vehic, gun, "fire", this); - gun.delay = time; - gun.attack_finished_single[0] = time + autocvar_g_vehicle_bumblebee_cannon_refire; - } + if (!forbidWeaponUse(this) + && PHYS_INPUT_BUTTON_ATCK(this) + && time > gun.attack_finished_single[0] + && gun.vehicle_energy >= autocvar_g_vehicle_bumblebee_cannon_cost) + { + gun.vehicle_energy -= autocvar_g_vehicle_bumblebee_cannon_cost; + bumblebee_fire_cannon(vehic, gun, "fire", this); + gun.delay = time; + gun.attack_finished_single[0] = time + autocvar_g_vehicle_bumblebee_cannon_refire; + } VEHICLE_UPDATE_PLAYER(this, vehic, health, bumblebee);