From eb365fc8660c84dfd4ca1d8065b8148f16fbcd81 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Wed, 4 Nov 2020 16:31:17 -0600 Subject: [PATCH] be sure to executte defaults prior to clientprefs to ensure nothing gets missed --- Templates/BaseGame/game/core/Core.cs | 3 +-- .../BaseGame/game/core/clientServer/scripts/client/client.cs | 3 +-- Templates/BaseGame/game/core/rendering/Core_Rendering.cs | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Templates/BaseGame/game/core/Core.cs b/Templates/BaseGame/game/core/Core.cs index ecf508046..b03ba52c7 100644 --- a/Templates/BaseGame/game/core/Core.cs +++ b/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(); diff --git a/Templates/BaseGame/game/core/clientServer/scripts/client/client.cs b/Templates/BaseGame/game/core/clientServer/scripts/client/client.cs index 6547e9915..0dc47139a 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/client/client.cs +++ b/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"); diff --git a/Templates/BaseGame/game/core/rendering/Core_Rendering.cs b/Templates/BaseGame/game/core/rendering/Core_Rendering.cs index 5bda82abb..653482d43 100644 --- a/Templates/BaseGame/game/core/rendering/Core_Rendering.cs +++ b/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();