equal
deleted
inserted
replaced
157 ami:= 0; |
157 ami:= 0; |
158 while (not b) and (ami < cMaxSlotAmmoIndex) do |
158 while (not b) and (ami < cMaxSlotAmmoIndex) do |
159 if (Ammo^[Slot, ami].Count = 0) |
159 if (Ammo^[Slot, ami].Count = 0) |
160 and (Ammo^[Slot, ami + 1].Count > 0) then b:= true |
160 and (Ammo^[Slot, ami + 1].Count > 0) then b:= true |
161 else inc(ami); |
161 else inc(ami); |
162 if b then // there's a free item in ammo stack |
162 if b then // there is a free item in ammo stack |
163 begin |
163 begin |
164 Ammo^[Slot, ami]:= Ammo^[Slot, ami + 1]; |
164 Ammo^[Slot, ami]:= Ammo^[Slot, ami + 1]; |
165 Ammo^[Slot, ami + 1].Count:= 0 |
165 Ammo^[Slot, ami + 1].Count:= 0 |
166 end; |
166 end; |
167 until not b; |
167 until not b; |