test on i should be first condition
authornemo
Sat, 23 Jul 2011 16:07:43 -0400
changeset 5439 25d3784dc0f6
parent 5436 3134fafcfe12
child 5441 39962b855540
test on i should be first condition
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Sat Jul 23 09:31:57 2011 +0400
+++ b/hedgewars/HHHandlers.inc	Sat Jul 23 16:07:43 2011 -0400
@@ -77,7 +77,7 @@
             ammoidx:= -1;
             //TryDo(i < 2, 'Engine bug: no ammo in current slot', true)
             end;
-        until ((Ammo^[slot, ammoidx].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns)) or (i = 1)
+        until (i = 1) or ((Ammo^[slot, ammoidx].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns))
         end 
     else
         begin