share/hedgewars/Data/Scripts/TechMaps.lua
changeset 13215 bc95df84395f
parent 12933 e65aa3c3d4e6
child 13562 0ff20bb15037
--- a/share/hedgewars/Data/Scripts/TechMaps.lua	Thu Mar 15 02:59:37 2018 +0100
+++ b/share/hedgewars/Data/Scripts/TechMaps.lua	Thu Mar 15 03:29:31 2018 +0100
@@ -12,6 +12,7 @@
 
 
 HedgewarsScriptLoad("/Scripts/Tracker.lua")
+HedgewarsScriptLoad("/Scripts/Utils.lua")
 
 techX = {}
 techY = {}
@@ -92,11 +93,16 @@
 		return
 	end
 
+        if MapGen == mgDrawn then
+	    eraseMap(false)
+        else
+	    MapGen = mgDrawn
+        end
+
 	if mapID == nil then
 		mapID = 2 + GetRandom(7)
 	end
 
-	MapGen = mgDrawn
     TemplateFilter = 0
 
     for x = 1, 16 do