Fix broken HedgeEditor map preview
authorWuzzy <almikes@aol.com>
Fri, 11 Sep 2015 03:07:48 +0200
changeset 11642 45316b6eb4a0
parent 11074 722567479fab
child 11643 df8fbbbcd775
Fix broken HedgeEditor map preview
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
share/hedgewars/Data/Scripts/TechMaps.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Fri Sep 04 08:14:12 2015 -0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Fri Sep 11 03:07:48 2015 +0200
@@ -279,6 +279,9 @@
 -- HEDGE EDITOR, SCRIPT BEGINS (Hey yo, it's about time)
 ---------------------------------------------------------
 
+-- Tell other scripts that we exist
+HedgeEditor = true
+
 HedgewarsScriptLoad("/Scripts/Locale.lua")
 HedgewarsScriptLoad("/Scripts/Tracker.lua")
 HedgewarsScriptLoad("/Scripts/Params.lua")
--- a/share/hedgewars/Data/Scripts/TechMaps.lua	Fri Sep 04 08:14:12 2015 -0400
+++ b/share/hedgewars/Data/Scripts/TechMaps.lua	Fri Sep 11 03:07:48 2015 +0200
@@ -88,6 +88,9 @@
 end
 
 function onPreviewInit()
+	if HedgeEditor == true then
+		return
+	end
 
 	if mapID == nil then
 		mapID = 2 + GetRandom(7)