]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix indenting so it's consistent with the rest of the function.
authorDavid Knapp <mazecraze96@gmail.com>
Sat, 27 Jul 2019 19:14:04 +0000 (15:14 -0400)
committerDavid Knapp <mazecraze96@gmail.com>
Sat, 27 Jul 2019 19:14:04 +0000 (15:14 -0400)
qcsrc/common/weapons/weapon/machinegun.qc

index fe45176ccbd79921ab0498447978995a4fcc6337..4c7e7256f40e0d4005e496c0dac41c7ac4152a28 100644 (file)
@@ -215,7 +215,7 @@ METHOD(MachineGun, wr_think, void(entity thiswep, entity actor, .entity weaponen
             W_MachineGun_Attack_Auto(thiswep, actor, weaponentity, fire);
         }
 
             W_MachineGun_Attack_Auto(thiswep, actor, weaponentity, fire);
         }
 
-       // You can "shoot" more rounds than what's "used", and vice versa.
+        // You can "shoot" more rounds than what's "used", and vice versa.
         if(fire & 2)
         if(weapon_prepareattack(thiswep, actor, weaponentity, true, 0))
         {
         if(fire & 2)
         if(weapon_prepareattack(thiswep, actor, weaponentity, true, 0))
         {
@@ -227,18 +227,18 @@ METHOD(MachineGun, wr_think, void(entity thiswep, entity actor, .entity weaponen
                 return;
             }
  
                 return;
             }
  
-                       // We don't want to shoot 3 rounds if there's 2 left in the mag, so we'll use a fraction.
-                       // Also keep the fraction <= 1 otherwise we'd mag dump in one burst.
-                       float burst_fraction = min(1, actor.(weaponentity).clip_load / WEP_CVAR(machinegun, burst_ammo));
-                       int to_shoot = floor(WEP_CVAR(machinegun, burst) * burst_fraction);
-
-                       // We also don't want to use 3 rounds if there's only 2 left.
-                       int to_use = min(WEP_CVAR(machinegun, burst_ammo), actor.(weaponentity).clip_load);
-                       W_DecreaseAmmo(thiswep, actor, to_use, weaponentity);
-
-                       // Bursting counts up to 0 from a negative.
-                       actor.(weaponentity).misc_bulletcounter = -to_shoot;
-                       W_MachineGun_Attack_Burst(thiswep, actor, weaponentity, fire);
+            // We don't want to shoot 3 rounds if there's 2 left in the mag, so we'll use a fraction.
+            // Also keep the fraction <= 1 otherwise we'd mag dump in one burst.
+            float burst_fraction = min(1, actor.(weaponentity).clip_load / WEP_CVAR(machinegun, burst_ammo));
+            int to_shoot = floor(WEP_CVAR(machinegun, burst) * burst_fraction);
+
+            // We also don't want to use 3 rounds if there's only 2 left.
+            int to_use = min(WEP_CVAR(machinegun, burst_ammo), actor.(weaponentity).clip_load);
+            W_DecreaseAmmo(thiswep, actor, to_use, weaponentity);
+
+            // Bursting counts up to 0 from a negative.
+            actor.(weaponentity).misc_bulletcounter = -to_shoot;
+            W_MachineGun_Attack_Burst(thiswep, actor, weaponentity, fire);
         }
     }
     else
         }
     }
     else