Call act as if attack ended on last shot if switching while in mid multi-shoot. Thanks to AI for discovering this.
authornemo
Sun, 03 Mar 2013 14:58:58 -0500
changeset 8631 796ed875aa95
parent 8630 91ad5fe4f1d5
child 8632 b5ed76d2a1f9
Call act as if attack ended on last shot if switching while in mid multi-shoot. Thanks to AI for discovering this.
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Sun Mar 03 14:39:55 2013 -0500
+++ b/hedgewars/uGearsHedgehog.pas	Sun Mar 03 14:58:58 2013 -0500
@@ -65,7 +65,12 @@
         begin
         if (CurAmmoType = amSniperRifle) and ((GameFlags and gfArtillery) = 0) then
             cArtillery := false;
-        OnUsedAmmo(HHGear^.Hedgehog^)
+        if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) = 0 then
+            begin
+            MultiShootAttacks:= Ammoz[CurAmmoType].Ammo.NumPerTurn;
+            AfterAttack
+            end
+        else OnUsedAmmo(HHGear^.Hedgehog^)
         end;
 
     MultiShootAttacks:= 0;