equal
deleted
inserted
replaced
18 |
18 |
19 {$INCLUDE "options.inc"} |
19 {$INCLUDE "options.inc"} |
20 |
20 |
21 unit uAmmos; |
21 unit uAmmos; |
22 interface |
22 interface |
23 uses uConsts, uTeams; |
23 uses uConsts, uTeams, uStats; |
24 |
24 |
25 procedure init_uAmmos; |
25 procedure init_uAmmos; |
26 procedure free_uAmmos; |
26 procedure free_uAmmos; |
27 |
27 |
28 procedure AddAmmoStore(s: shortstring); |
28 procedure AddAmmoStore(s: shortstring); |
66 |
66 |
67 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
67 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
68 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; |
68 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; |
69 inc(mi[Ammoz[a].Slot]) |
69 inc(mi[Ammoz[a].Slot]) |
70 end |
70 end |
71 else if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
71 else if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
72 begin |
72 begin |
73 TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); |
73 TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); |
74 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; |
74 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; |
75 |
75 |
76 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; |
76 Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; |