hedgewars/uTeams.pas
changeset 255 97b2d242e2a1
parent 247 07605d2a2024
child 286 6aa69a531d50
equal deleted inserted replaced
254:6bdb58eff749 255:97b2d242e2a1
   352 var t: integer;
   352 var t: integer;
   353 begin
   353 begin
   354 t:= cMaxSlotAmmoIndex;
   354 t:= cMaxSlotAmmoIndex;
   355 with CurrentTeam^ do
   355 with CurrentTeam^ do
   356      with Hedgehogs[CurrHedgehog] do
   356      with Hedgehogs[CurrHedgehog] do
   357           while (Ammo[CurSlot, CurAmmo].AmmoType <> weap) and (t > 0) do
   357           while (Ammo[CurSlot, CurAmmo].AmmoType <> weap) and (t >= 0) do
   358                 begin
   358                 begin
   359                 ParseCommand('/slot ' + chr(49 + Ammoz[TAmmoType(weap)].Slot));
   359                 ParseCommand('/slot ' + chr(49 + Ammoz[TAmmoType(weap)].Slot));
   360                 dec(t)
   360                 dec(t)
   361                 end
   361                 end
   362 end;
   362 end;