diff --git a/src/Features/LightLimitFix.h b/src/Features/LightLimitFix.h index 5f4a979162..9a7d317a78 100644 --- a/src/Features/LightLimitFix.h +++ b/src/Features/LightLimitFix.h @@ -278,6 +278,33 @@ struct LightLimitFix : Feature static inline REL::Relocation func; }; + struct ValidLight1 + { + static bool thunk(RE::BSShaderProperty* a_property, RE::BSLight* a_light) + { + return func(a_property, a_light) && (a_light->portalStrict || !a_light->portalGraph); + } + static inline REL::Relocation func; + }; + + struct ValidLight2 + { + static bool thunk(RE::BSShaderProperty* a_property, RE::BSLight* a_light) + { + return func(a_property, a_light) && (a_light->portalStrict || !a_light->portalGraph); + } + static inline REL::Relocation func; + }; + + struct ValidLight3 + { + static bool thunk(RE::BSShaderProperty* a_property, RE::BSLight* a_light) + { + return func(a_property, a_light) && (a_light->portalStrict || !a_light->portalGraph); + } + static inline REL::Relocation func; + }; + static void Install() { stl::write_thunk_call(REL::RelocationID(38900, 39946).address() + REL::Relocate(0x1C9, 0x1D3)); @@ -290,6 +317,10 @@ struct LightLimitFix : Feature stl::detour_thunk(REL::RelocationID(68937, 70288)); + stl::write_thunk_call(REL::RelocationID(100994, 107781).address() + 0x92); + stl::write_thunk_call(REL::RelocationID(100997, 107784).address() + REL::Relocate(0x139, 0x12A)); + stl::write_thunk_call(REL::RelocationID(101296, 108283).address() + REL::Relocate(0xB7, 0x7E)); + logger::info("[LLF] Installed hooks"); } };