hedgewars/uScript.pas
changeset 9567 42bc1b58a242
parent 9531 7fcdedc45589
child 9648 3a3defce1b28
--- a/hedgewars/uScript.pas	Sun Oct 20 20:10:09 2013 -0400
+++ b/hedgewars/uScript.pas	Mon Oct 21 12:38:24 2013 -0400
@@ -95,6 +95,7 @@
     ScriptAmmoDelay : shortstring;
     ScriptAmmoReinforcement : shortstring;
     ScriptLoaded : boolean;
+    mapDims : boolean;
 
 procedure ScriptPrepareAmmoStore; forward;
 procedure ScriptApplyAmmoStore; forward;
@@ -2065,7 +2066,8 @@
     end;
 
 ScriptSetInteger('ClansCount', ClansCount);
-ScriptSetInteger('TeamsCount', TeamsCount)
+ScriptSetInteger('TeamsCount', TeamsCount);
+mapDims:= false
 end;
 
 
@@ -2122,8 +2124,9 @@
 ScriptSetInteger('GameTime', GameTicks);
 ScriptSetInteger('TotalRounds', TotalRounds);
 ScriptSetInteger('WaterLine', cWaterLine);
-if GameTicks = 0 then
+if not mapDims then
     begin
+    mapDims:= true;
     ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);
     ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT);
     ScriptSetInteger('LeftX', leftX);
@@ -2621,6 +2624,7 @@
 
 procedure initModule;
 begin
+mapDims:= false;
 end;
 
 procedure freeModule;