hedgewars/uAmmos.pas
changeset 1909 30fa1608b54f
parent 1895 7ba647a88b2f
child 1915 c357f5b55320
--- a/hedgewars/uAmmos.pas	Sun Mar 22 17:39:12 2009 +0000
+++ b/hedgewars/uAmmos.pas	Sun Mar 22 17:41:07 2009 +0000
@@ -226,11 +226,15 @@
 procedure SwitchNotHoldedAmmo(var Hedgehog: THedgehog);
 begin
 with Hedgehog do
-     if (Ammo^[CurSlot, CurAmmo].Propz and ammoprop_DontHold) <> 0 then
+     if ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_DontHold) <> 0) or
+        (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber > 0) then
         begin
         CurAmmo:= 0;
         CurSlot:= 0;
-        while (CurSlot <= cMaxSlotIndex) and (Ammo^[CurSlot, CurAmmo].Count = 0) do inc(CurSlot)
+        while (CurSlot <= cMaxSlotIndex) and 
+              (Ammo^[CurSlot, CurAmmo].Count = 0) and
+              (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber > 0)
+              do inc(CurSlot)
         end
 end;