]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
manually fix one if chain
authorMartin Taibr <taibr.martin@gmail.com>
Wed, 25 Oct 2017 13:35:23 +0000 (15:35 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Wed, 25 Oct 2017 13:35:23 +0000 (15:35 +0200)
qcsrc/common/vehicles/vehicle/bumblebee.qc

index 018e1a17db9cf3ee0277d7097ec8188bcb7ce2f0..22762bd025bcd0caa711b9ff1111a86f13919624 100644 (file)
@@ -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);