# HG changeset patch # User Wuzzy # Date 1520466360 -3600 # Node ID 61076bb26cb375da920443c9ef32e2c4c836f9e2 # Parent 071dcdf33f86d363c30bc34a18654a4488a62027 SimpleMission: Set GameFlags more cleanly diff -r 071dcdf33f86 -r 61076bb26cb3 share/hedgewars/Data/Scripts/SimpleMission.lua --- 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