# HG changeset patch # User nemo # Date 1266289406 0 # Node ID 8c3f078bc67d67c04be4eb1b9ad114f8c80dbef6 # Parent df7ec369992bf9ec4dcae6ab3a3bc1504a7bf1a6 Ensure InitialCount gets a value diff -r df7ec369992b -r 8c3f078bc67d hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Tue Feb 16 02:23:12 2010 +0000 +++ b/hedgewars/uAmmos.pas Tue Feb 16 03:03:26 2010 +0000 @@ -55,6 +55,7 @@ FillChar(Ammo^, sizeof(Ammo^), 0); for a:= Low(TAmmoType) to High(TAmmoType) do begin + Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0; if cnts[a] > 0 then begin TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); @@ -73,7 +74,6 @@ Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; - Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0; inc(mi[Ammoz[a].Slot]) end