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
1 changed files with 3 additions and 2 deletions

View File

@ -210,15 +210,16 @@ function settings.determineOS()
end
function settings.determineMode()
settings.set("fs_game", et.trap_Cvar_Get("fs_game"))
-- mode has been manually specified
if settings.get("g_standalone") then
return
end
local mod = et.trap_Cvar_Get("fs_game")
local shrubbot = et.trap_Cvar_Get("g_shrubbot") -- etpub, nq
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)
elseif (not shrubbot or shrubbot == "") and (not dbDir or dbDir == "") then
settings.set("g_standalone", 1)