share/hedgewars/Data/Scripts/SimpleMission.lua
changeset 13100 61076bb26cb3
parent 13061 8d2087c85b8d
child 13583 141cdfe0f3ca
child 13588 c3d8469cc68e
--- a/share/hedgewars/Data/Scripts/SimpleMission.lua	Thu Mar 08 00:18:32 2018 +0100
+++ b/share/hedgewars/Data/Scripts/SimpleMission.lua	Thu Mar 08 00:46:00 2018 +0100
@@ -638,13 +638,17 @@
 		Explosives = 0
 
 		for initVarName, initVarValue in pairs(params.initVars) do
-			_G[initVarName] = initVarValue
+			if initVarName == GameFlags then
+				EnableGameFlags(initVarValue)
+			else
+				_G[initVarName] = initVarValue
+			end
 		end
 		if #params.teams == 1 then
-			GameFlags = bor(GameFlags, gfOneClanMode)
+			EnableGameFlags(gfOneClanMode)
 		end
 		if params.wind then
-			GameFlags = bor(GameFlags, gfDisableWind)
+			EnableGameFlags(gfDisableWind)
 		end
 
 		local clanCounter = 0