tentative/lazy fixes for unC0Rr's evil
authormikade <redgrinner@gmail.com>
Tue, 14 Jul 2015 20:01:15 +0900
changeset 11012 91cc6aef818c
parent 11011 6c66b594b780
child 11013 594a84819c78
tentative/lazy fixes for unC0Rr's evil
share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua
share/hedgewars/Data/Scripts/TechMaps.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Tue Jul 14 03:45:27 2015 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua	Tue Jul 14 20:01:15 2015 +0900
@@ -691,6 +691,10 @@
 
 function onGameInit()
 
+		if mapID == nil then
+			mapID = 2 + GetRandom(7)
+		end
+
 		Theme = "Cave"
 
 		MapGen = mgDrawn
--- a/share/hedgewars/Data/Scripts/TechMaps.lua	Tue Jul 14 03:45:27 2015 +0200
+++ b/share/hedgewars/Data/Scripts/TechMaps.lua	Tue Jul 14 20:01:15 2015 +0900
@@ -88,7 +88,12 @@
 end
 
 function onPreviewInit()
-    MapGen = mgDrawn
+
+	if mapID == nil then
+		mapID = 2 + GetRandom(7)
+	end
+
+	MapGen = mgDrawn
     TemplateFilter = 0
 
     for x = 1, 16 do
@@ -1344,6 +1349,8 @@
     FlushPoints()
 end
 
+local bastard = nil
+
 function LoadMap(mID)
 
 	techX = {}