equal
deleted
inserted
replaced
273 while (not b) and (ami < cMaxSlotAmmoIndex) do |
273 while (not b) and (ami < cMaxSlotAmmoIndex) do |
274 if (Ammo[Slot, ami].Count = 0) |
274 if (Ammo[Slot, ami].Count = 0) |
275 and (Ammo[Slot, ami + 1].Count > 0) then b:= true |
275 and (Ammo[Slot, ami + 1].Count > 0) then b:= true |
276 else inc(ami); |
276 else inc(ami); |
277 if b then // there's a free item in ammo stack |
277 if b then // there's a free item in ammo stack |
278 Ammo[Slot, ami]:= Ammo[Slot, ami + 1] |
278 begin |
|
279 Ammo[Slot, ami]:= Ammo[Slot, ami + 1]; |
|
280 Ammo[Slot, ami + 1].Count:= 0 |
|
281 end; |
279 until not b; |
282 until not b; |
280 end; |
283 end; |
281 |
284 |
282 procedure OnUsedAmmo(Ammo: PHHAmmo); |
285 procedure OnUsedAmmo(Ammo: PHHAmmo); |
283 var s, a: Longword; |
286 var s, a: Longword; |