Restore map scaling of Tunnels script
authorWuzzy <Wuzzy2@mail.ru>
Thu, 10 Jan 2019 23:22:44 +0100
changeset 14555 8b66de6c9fb0
parent 14554 ca27e4cd15fd
child 14556 1c623169a44d
Restore map scaling of Tunnels script
share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua	Thu Jan 10 23:16:32 2019 +0100
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Tunnels.lua	Thu Jan 10 23:22:44 2019 +0100
@@ -7,9 +7,12 @@
 function onGameInit()
     MapGen = mgDrawn
     TemplateFilter = 0
+    local mapComplexity = MapFeatureSize
+    -- reset feature size after use, to disable scaling
+    MapFeatureSize = 12
     fillMap(false)
     side = 0
-    for i = 0,1+MapFeatureSize*2 do
+    for i = 0,1+mapComplexity*2 do
         if side > 3 then 
             size = GetRandom(4)+4
         else