Correctly set fs_game in settings module

This commit is contained in:
Timo Smit 2019-01-31 11:33:00 +01:00
parent 5c0c9d3cee
commit a253e00d15

View file

@ -210,15 +210,16 @@ function settings.determineOS()
end end
function settings.determineMode() function settings.determineMode()
settings.set("fs_game", et.trap_Cvar_Get("fs_game"))
-- mode has been manually specified -- mode has been manually specified
if settings.get("g_standalone") then if settings.get("g_standalone") then
return return
end end
local mod = et.trap_Cvar_Get("fs_game")
local shrubbot = et.trap_Cvar_Get("g_shrubbot") -- etpub, nq local shrubbot = et.trap_Cvar_Get("g_shrubbot") -- etpub, nq
local dbDir = et.trap_Cvar_Get("g_dbDirectory") -- silent local dbDir = et.trap_Cvar_Get("g_dbDirectory") -- silent
if mod == "legacy" or mod == "etpro" then if settings.get("fs_game") == "legacy" or settings.get("fs_game") == "etpro" then
settings.set("g_standalone", 1) settings.set("g_standalone", 1)
elseif (not shrubbot or shrubbot == "") and (not dbDir or dbDir == "") then elseif (not shrubbot or shrubbot == "") and (not dbDir or dbDir == "") then
settings.set("g_standalone", 1) settings.set("g_standalone", 1)