Check on an infinite attacks mode, still many problems in actual weapons
authornemo
Sun, 10 Oct 2010 12:32:12 -0400
changeset 3945 c3d5eace0a32
parent 3944 7ec1ef6a5ee6
child 3946 41e06b74c991
Check on an infinite attacks mode, still many problems in actual weapons
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Sun Oct 10 12:22:57 2010 -0400
+++ b/hedgewars/HHHandlers.inc	Sun Oct 10 12:32:12 2010 -0400
@@ -323,17 +323,13 @@
             end
         else
             begin
-            if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0 then
+            OnUsedAmmo(CurrentHedgehog^);
+            if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) and ((GameFlags and gfInfAttack) = 0) then
                 begin
-                OnUsedAmmo(CurrentHedgehog^);
                 TurnTimeLeft:= Ammoz[CurAmmoType].TimeAfterTurn;
                 State:= State or gstAttacked
                 end
-            else
-                begin
-                OnUsedAmmo(CurrentHedgehog^);
-                ApplyAmmoChanges(CurrentHedgehog^)
-                end
+            else ApplyAmmoChanges(CurrentHedgehog^)
             end;
         end
     else