hedgewars/uAmmos.pas
changeset 1915 c357f5b55320
parent 1909 30fa1608b54f
child 1922 88cdabb51995
equal deleted inserted replaced
1914:aab686a4e0c5 1915:c357f5b55320
   225 
   225 
   226 procedure SwitchNotHoldedAmmo(var Hedgehog: THedgehog);
   226 procedure SwitchNotHoldedAmmo(var Hedgehog: THedgehog);
   227 begin
   227 begin
   228 with Hedgehog do
   228 with Hedgehog do
   229      if ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_DontHold) <> 0) or
   229      if ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_DontHold) <> 0) or
   230         (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber > 0) then
   230         (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0) then
   231         begin
   231         begin
   232         CurAmmo:= 0;
   232         CurAmmo:= 0;
   233         CurSlot:= 0;
   233         CurSlot:= 0;
   234         while (CurSlot <= cMaxSlotIndex) and 
   234         while (CurSlot <= cMaxSlotIndex) and 
   235               (Ammo^[CurSlot, CurAmmo].Count = 0) and
   235               (Ammo^[CurSlot, CurAmmo].Count = 0) and
   236               (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber > 0)
   236               (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0)
   237               do inc(CurSlot)
   237               do inc(CurSlot)
   238         end
   238         end
   239 end;
   239 end;
   240 
   240 
   241 procedure SetWeapon(weap: TAmmoType);
   241 procedure SetWeapon(weap: TAmmoType);