equal
deleted
inserted
replaced
67 i:= 0; |
67 i:= 0; |
68 repeat |
68 repeat |
69 inc(ammoidx); |
69 inc(ammoidx); |
70 if (ammoidx > cMaxSlotAmmoIndex) then |
70 if (ammoidx > cMaxSlotAmmoIndex) then |
71 begin |
71 begin |
72 ammoidx:= 0; |
|
73 inc(i); |
72 inc(i); |
74 TryDo(i < 2, 'Engine bug: no ammo in current slot', true) |
73 CurAmmoType:= amNothing; |
|
74 ammoidx:= -1; |
|
75 //TryDo(i < 2, 'Engine bug: no ammo in current slot', true) |
75 end; |
76 end; |
76 until (Ammo^[slot, ammoidx].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns) |
77 until ((Ammo^[slot, ammoidx].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns)) or (i = 1) |
77 end |
78 end |
78 else |
79 else |
79 begin |
80 begin |
80 i:= 0; |
81 i:= 0; |
81 // check whether there is ammo in slot |
82 // check whether there is ammo in slot |