--- a/hedgewars/HHHandlers.inc Sun Oct 10 16:51:40 2010 -0400
+++ b/hedgewars/HHHandlers.inc Sun Oct 10 20:16:17 2010 -0400
@@ -69,11 +69,12 @@
inc(ammoidx);
if (ammoidx > cMaxSlotAmmoIndex) then
begin
- ammoidx:= 0;
inc(i);
- TryDo(i < 2, 'Engine bug: no ammo in current slot', true)
+ CurAmmoType:= amNothing;
+ 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)
+ until ((Ammo^[slot, ammoidx].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns)) or (i = 1)
end
else
begin