share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua
changeset 13284 9ac674499985
parent 13283 7476c1a50738
child 14464 35d47e99f5e2
--- a/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua	Sat Mar 24 23:13:57 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/ShoppaMap.lua	Sat Mar 24 23:45:16 2018 +0100
@@ -4,13 +4,11 @@
 
 -- Overall padding for roping freedom
 local Padding = 430
+-- If true, rope assumes team color
 local TeamRope = false
 
 function onParameters()
     parseParams()
-    if params["pad"] ~= nil then
-        Padding = params["pad"]
-    end
     if params["teamrope"] ~= nil then
         TeamRope = true
     end
@@ -329,6 +327,15 @@
 end
 
 function onGameInit()
+    -- Calculate padding, determined  by map feature size
+    if MapFeatureSize <= 20 then
+        -- 10 .. 710. Step size=35
+        Padding = 10 + MapFeatureSize * 35
+    else
+        -- 780 .. 1060. Step size=70
+        Padding = 710 + (MapFeatureSize-20) * 70
+    end
+
     MapGen = mgDrawn
     TemplateFilter = 0
     local TotGen = 0