# HG changeset patch # User sheepluva # Date 1441165922 -7200 # Node ID 884f40b6f64090946bd7d1a751008ed85f03a33f # Parent c57f815cbb149ae1db8547621c1566ec40b6e86c some more tweaks diff -r c57f815cbb14 -r 884f40b6f640 share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua Wed Sep 02 04:59:17 2015 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/DiagonalMaze.lua Wed Sep 02 05:52:02 2015 +0200 @@ -6,14 +6,17 @@ function onGameInit() MapGen = mgDrawn TemplateFilter = 0 - local step = 80 + 10 * MapFeatureSize; + local step = 80 + 10 * MapFeatureSize + local width = 1 + div(math.max(0, MapFeatureSize-12), 6) + -- center maze + local xoff = div((4000 % step), 2) for y = 48,2048,step do - for x = 48,4048,step do + for x = 48+xoff,4048-step,step do if GetRandom(2) == 0 then - AddPoint(x,y,1) + AddPoint(x,y,width) AddPoint(x+step,y+step) else - AddPoint(x,y+step,1) + AddPoint(x,y+step,width) AddPoint(x+step,y) end end