hedgewars/uScript.pas
changeset 7650 ffa26ebdf8ae
parent 7628 bc7b1d228a2c
child 7721 2b1ad418ba39
--- a/hedgewars/uScript.pas	Sun Sep 02 09:23:36 2012 -0400
+++ b/hedgewars/uScript.pas	Sun Sep 02 10:11:24 2012 -0400
@@ -1950,9 +1950,14 @@
 ScriptSetInteger('RealTime', RealTicks);
 ScriptSetInteger('TotalRounds', TotalRounds);
 ScriptSetInteger('WaterLine', cWaterLine);
-ScriptSetInteger('LeftX', leftX);
-ScriptSetInteger('RightX', rightX);
-ScriptSetInteger('TopY', topY);
+if GameTicks = 0 then
+    begin
+    ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);
+    ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT);
+    ScriptSetInteger('LeftX', leftX);
+    ScriptSetInteger('RightX', rightX);
+    ScriptSetInteger('TopY', topY)
+    end;
 if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then
     ScriptSetInteger('CurrentHedgehog', CurrentHedgehog^.Gear^.UID)
 else
@@ -2149,8 +2154,6 @@
 luaopen_table(luaState);
 
 // import some variables
-ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);
-ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT);
 ScriptSetString(_S'L', cLocale);
 
 // import game flags