Merge pull request #376 from Azaezel/alpha40_FixPrefLookup

be sure to executte defaults prior to clientprefs
This commit is contained in:
Brian Roberts 2020-11-11 12:20:23 -06:00 committed by GitHub
commit b96d342960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View file

@ -27,11 +27,10 @@ function CoreModule::onCreate(%this)
ModuleDatabase.LoadExplicit( "Core_PostFX" );
ModuleDatabase.LoadExplicit( "Core_GameObjects" );
exec("data/defaults.cs");
%prefPath = getPrefpath();
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
exec( %prefPath @ "/clientPrefs.cs" );
else
exec("data/defaults.cs");
// Seed the random number generator.
setRandomSeed();

View file

@ -15,11 +15,10 @@ function initClient()
exec( "./levelLoad.cs" );
//load prefs
exec( "data/defaults.cs" );
%prefPath = getPrefpath();
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
exec( %prefPath @ "/clientPrefs.cs" );
else
exec( "data/defaults.cs" );
callOnModules("initClient");

View file

@ -33,11 +33,10 @@ function Core_Rendering::initClient(%this)
initLightingSystems("Advanced Lighting");
//load prefs
exec("data/defaults.cs");
%prefPath = getPrefpath();
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
exec( %prefPath @ "/clientPrefs.cs" );
else
exec("data/defaults.cs");
configureCanvas();