Set default empty ammo sets. Current mission handling appears to not pass any default ammo set, so script was never getting a chance to set its own.
authornemo
Sat, 10 Mar 2012 16:10:38 -0500
changeset 6762 85ba0c55d077
parent 6761 e95f7509a5c5
child 6763 8a06161ede49
Set default empty ammo sets. Current mission handling appears to not pass any default ammo set, so script was never getting a chance to set its own.
hedgewars/uAmmos.pas
--- a/hedgewars/uAmmos.pas	Sat Mar 10 15:56:36 2012 -0500
+++ b/hedgewars/uAmmos.pas	Sat Mar 10 16:10:38 2012 -0500
@@ -466,6 +466,7 @@
 end;
 
 procedure initModule;
+var i: Longword;
 begin
     RegisterVariable('ammloadt', vtCommand, @SetAmmoLoadout, false);
     RegisterVariable('ammdelay', vtCommand, @SetAmmoDelay, false);
@@ -478,6 +479,13 @@
     ammoProbability:= '';
     ammoDelay:= '';
     ammoReinforcement:= '';
+    for i:=1 to ord(High(TAmmoType)) do
+        begin
+        ammoLoadout:= ammoLoadout + '0';
+        ammoProbability:= ammoProbability + '0';
+        ammoDelay:= ammoDelay + '0';
+        ammoReinforcement:= ammoReinforcement + '0'
+        end;
     FillChar(InitialCounts, sizeof(InitialCounts), 0)
 end;