hedgewars/uLand.pas
changeset 13757 f1c66a34f2fe
parent 13506 bdac56fb6f1a
child 13793 381e37c6d5d9
--- a/hedgewars/uLand.pas	Mon Sep 03 12:59:54 2018 +0200
+++ b/hedgewars/uLand.pas	Mon Sep 03 20:01:50 2018 +0200
@@ -873,6 +873,7 @@
 if (WorldEdge <> weNone) and (not hasBorder) then
     InitWorldEdges();
 
+ScriptSetMapGlobals;
 end;
 
 procedure GenPreview(out Preview: TPreview);
@@ -889,6 +890,8 @@
         OutError('Unknown mapgen', true);
     end;
 
+    ScriptSetMapGlobals;
+
     // strict scaling needed here since preview assumes a rectangle
     rh:= max(LAND_HEIGHT,2048);
     rw:= max(LAND_WIDTH,4096);
@@ -938,6 +941,8 @@
         OutError('Unknown mapgen', true);
     end;
 
+    ScriptSetMapGlobals;
+
     // strict scaling needed here since preview assumes a rectangle
     rh:= max(LAND_HEIGHT, 2048);
     rw:= max(LAND_WIDTH, 4096);