FillAmmoStore is reused - check for before start of play.
authornemo
Sun, 21 Mar 2010 16:04:57 +0000
changeset 3033 2a8f385ab466
parent 3032 9c190d3c165b
child 3034 b576460ba8ad
FillAmmoStore is reused - check for before start of play.
hedgewars/uAmmos.pas
--- a/hedgewars/uAmmos.pas	Sun Mar 21 15:50:38 2010 +0000
+++ b/hedgewars/uAmmos.pas	Sun Mar 21 16:04:57 2010 +0000
@@ -20,7 +20,7 @@
 
 unit uAmmos;
 interface
-uses uConsts, uTeams;
+uses uConsts, uTeams, uStats;
 
 procedure init_uAmmos;
 procedure free_uAmmos;
@@ -68,7 +68,7 @@
            Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE;
        inc(mi[Ammoz[a].Slot])
        end
-    else if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then 
+    else if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then 
        begin
        TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
        Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;