From 6073c6ef3a85557e3a1ff3ab03abe0b3e0d93f7c Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 15 Sep 2026 14:32:10 -0400 Subject: Fix disableLights, lock in CreateLightObject() Also keep some temporary asserts around for now Signed-off-by: Andrew Opalach --- Plugin.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Plugin.cs') diff --git a/Plugin.cs b/Plugin.cs index 318f0a3..984b3ad 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -25,6 +25,7 @@ using SharpPluginLoader.Core.Resources; #endif // @TODO: +// - https://dev.epicgames.com/community/learning/tutorials/34xz/unreal-engine-ocio-3d-luts-applying-3d-luts-when-using-ocio // - Add built-in LUT list. // - Configurable Broad Area Shadow Resolution. // - Hook sMhScene constructor to set hqMode. @@ -47,6 +48,7 @@ using SharpPluginLoader.Core.Resources; // - Special Arena. // - Elder's Recess Lavasioth area. // - Hoarfrost pit area with wedge beetles. +// - Xeno starting area (Confluence of Fates) corner next to water. // // Known issues to think about: // - Hair clipping when character looks down. @@ -70,7 +72,7 @@ namespace WorldTuningTool if (!condition && !loggedAssertFailed) { Log.Error($"Assert failed on line {line}."); - loggedAssertFailed = true; + //loggedAssertFailed = true; } #if ENABLE_ASSERTS Trace.Assert(condition); @@ -2472,11 +2474,6 @@ namespace WorldTuningTool createTAAObject2 = Hook.Create(0x142391320, CreateTAAObject2Hook); // nint destroyTAAObject = Hook.Create(0x1423916E0, DestroyTAAObjectHook); // nint, int - if (!disableLightsFeature) - { - lights.Initialize(); - } - nint addr = PatternScanner.FindFirst(Pattern.FromString("48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 55 41 56 41 57 48 8B EC 48 83 EC 30 48 8B FA 48 8B D9 E8 AA B6 C1 FF 48 8B 47 10 48 8D 57 50")); Assert(addr == 0x141AB2260); // nint, nint updateShadowParams = Hook.Create(addr, UpdateShadowParamsHook); @@ -2675,6 +2672,10 @@ namespace WorldTuningTool { Config config = getConfig(); disableLightsFeature = config.DisableLightsFeature; + if (!disableLightsFeature) + { + lights.Initialize(); + } PatchConfig patches = config.Patches; #if SHADER_FEATURES fullResSSLR = patches.FullResolutionSSLR; @@ -3470,7 +3471,7 @@ namespace WorldTuningTool } if (!config.Overrides.ContainsKey(stage)) { - Log.Error($"Unknown stage: {stage}"); + Log.Error($"Unknown stage: {stage}."); stage = globalStage; } if (stage != globalStage) -- cgit v1.2.3-101-g0448