diff options
| author | 2026-10-28 00:51:16 -0400 | |
|---|---|---|
| committer | 2026-10-28 00:51:16 -0400 | |
| commit | 7d53f506ad066d331f69201ec0b8c733175e4d10 (patch) | |
| tree | 4c8876312c7ef0cff082acc7436c17f364bce03e /Plugin.cs | |
| parent | f812a34a217a441f7d9df57861aa52be6b1dbd9b (diff) | |
| download | WorldTuningTool-7d53f506ad066d331f69201ec0b8c733175e4d10.tar.gz WorldTuningTool-7d53f506ad066d331f69201ec0b8c733175e4d10.tar.bz2 WorldTuningTool-7d53f506ad066d331f69201ec0b8c733175e4d10.zip | |
Load overrides config earlier
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'Plugin.cs')
| -rw-r--r-- | Plugin.cs | 42 |
1 files changed, 22 insertions, 20 deletions
@@ -1310,7 +1310,10 @@ namespace WorldTuningTool } setBroadAreaShadowResolution(multiplier); currentShadowResMultiplier = multiplier; - setShadowQuality.Invoke(sMhScene!.Get<int>(0x5530) + 1); + if (sMhScene != null) + { + setShadowQuality.Invoke(sMhScene.Get<int>(0x5530) + 1); + } } private static void shadowResDisable() @@ -1862,7 +1865,7 @@ namespace WorldTuningTool public void OnPreMain() { Config config = getConfig(); - setSelection = new(config.Sets, "Set"); + disableLightsFeature = config.DisableLightsFeature; if (!disableLightsFeature) { @@ -1947,25 +1950,7 @@ namespace WorldTuningTool viewModeAddressLod1.Enable(); viewModeAddressLod2.Enable(); } - } - public void OnLoad() - { - sMhScene = SingletonManager.GetSingleton("sMhScene")!; - sMhMain = SingletonManager.GetSingleton("sMhMain")!; - sMhRender = SingletonManager.GetSingleton("sMhRender")!; - sMhGUI = SingletonManager.GetSingleton("sMhGUI")!; - sTime = SingletonManager.GetSingleton("sTime")!; - sQuest = SingletonManager.GetSingleton("sQuest")!; - sLightLinker = SingletonManager.GetSingleton("sLightLinker")!; - sLightProbes = SingletonManager.GetSingleton("sLightProbes")!; - sVolumeRenderer = SingletonManager.GetSingleton("sVolumeRenderer")!; - sMhSpeedTree = SingletonManager.GetSingleton("sMhSpeedTree")!; - foreach (Parameter param in sLightProbesParameters) - { - param.Update(sLightProbes!.Instance); - } - Config config = getConfig(); if (config.SelectedGlobal == "") { config.SelectedGlobal = "Base"; @@ -2007,7 +1992,24 @@ namespace WorldTuningTool break; } } + saveConfig(config); + + setSelection = new(config.Sets, "Set"); + } + + public void OnLoad() + { + sMhScene = SingletonManager.GetSingleton("sMhScene")!; + sMhMain = SingletonManager.GetSingleton("sMhMain")!; + sMhRender = SingletonManager.GetSingleton("sMhRender")!; + sMhGUI = SingletonManager.GetSingleton("sMhGUI")!; + sTime = SingletonManager.GetSingleton("sTime")!; + sQuest = SingletonManager.GetSingleton("sQuest")!; + sLightLinker = SingletonManager.GetSingleton("sLightLinker")!; + sLightProbes = SingletonManager.GetSingleton("sLightProbes")!; + sVolumeRenderer = SingletonManager.GetSingleton("sVolumeRenderer")!; + sMhSpeedTree = SingletonManager.GetSingleton("sMhSpeedTree")!; } // It's hard to test, but I'm pretty sure just updating stepTime isn't enough for a higher rate to look right. |