浏览代码

be sure to executte defaults prior to clientprefs to ensure nothing gets missed

AzaezelX 4 年之前
父节点
当前提交
eb365fc866

+ 1 - 2
Templates/BaseGame/game/core/Core.cs

@@ -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();

+ 1 - 2
Templates/BaseGame/game/core/clientServer/scripts/client/client.cs

@@ -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");
 

+ 1 - 2
Templates/BaseGame/game/core/rendering/Core_Rendering.cs

@@ -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();