equal
deleted
inserted
replaced
53 begin |
53 begin |
54 FillChar(mi, sizeof(mi), 0); |
54 FillChar(mi, sizeof(mi), 0); |
55 FillChar(Ammo^, sizeof(Ammo^), 0); |
55 FillChar(Ammo^, sizeof(Ammo^), 0); |
56 for a:= Low(TAmmoType) to High(TAmmoType) do |
56 for a:= Low(TAmmoType) to High(TAmmoType) do |
57 begin |
57 begin |
|
58 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0; |
58 if cnts[a] > 0 then |
59 if cnts[a] > 0 then |
59 begin |
60 begin |
60 TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); |
61 TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); |
61 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; |
62 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; |
62 |
63 |
71 begin |
72 begin |
72 TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); |
73 TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); |
73 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; |
74 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; |
74 |
75 |
75 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; |
76 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; |
76 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0; |
|
77 |
77 |
78 inc(mi[Ammoz[a].Slot]) |
78 inc(mi[Ammoz[a].Slot]) |
79 end |
79 end |
80 end |
80 end |
81 end; |
81 end; |