make diagonal maze use map feature size
authorsheepluva
Wed, 02 Sep 2015 04:59:17 +0200
changeset 11063 c57f815cbb14
parent 11062 46f293e8cbfb
child 11064 884f40b6f640
make diagonal maze use map feature size
share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua	Wed Sep 02 04:49:11 2015 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua	Wed Sep 02 04:59:17 2015 +0200
@@ -6,14 +6,15 @@
 function onGameInit()
     MapGen = mgDrawn
     TemplateFilter = 0
-    for y = 48,2048,200 do
-       for x = 48,4048,200 do
+    local step = 80 + 10 * MapFeatureSize;
+    for y = 48,2048,step do
+       for x = 48,4048,step do
             if GetRandom(2) == 0 then
                 AddPoint(x,y,1)
-                AddPoint(x+200,y+200)
+                AddPoint(x+step,y+step)
             else
-                AddPoint(x,y+200,1)
-                AddPoint(x+200,y)
+                AddPoint(x,y+step,1)
+                AddPoint(x+step,y)
             end
         end
     end