From fa7c3ab2b870bf4922362466b9c8b4271cd8703a Mon Sep 17 00:00:00 2001 From: m Date: Sun, 12 Jan 2025 12:47:27 -0600 Subject: [PATCH] finalize working patch --- src/client/component/map_patches.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/client/component/map_patches.cpp b/src/client/component/map_patches.cpp index b8725027..d760903d 100644 --- a/src/client/component/map_patches.cpp +++ b/src/client/component/map_patches.cpp @@ -106,7 +106,7 @@ namespace map_patches WEAK game::symbol Vec3Normalize{ 0x5E090, 0x68D20 }; WEAK game::symbol SV_BrushModelSightTrace{ 0x19F830, 0x3370A0 }; - game::symbol comWorld{ 0xB49E518, 0xA97C0E0 }; + game::symbol comWorld{ 0xECA078, 0x10B4528 }; game::symbol s_world{ 0xF7A2BE0, 0xE973AE0 }; game::dvar_t* r_lightGridNonCompressed; @@ -181,14 +181,16 @@ namespace map_patches return true; if (!newPrimaryLightEnvIndex) return false; - if (comWorld->primaryLightEnvs[oldPrimaryLightEnvIndex].numIndices == 1 - && comWorld->primaryLightEnvs[oldPrimaryLightEnvIndex].primaryLightIndices[0] >= 2048 + + auto comWorld_ptr = *comWorld; + if (comWorld_ptr->primaryLightEnvs[oldPrimaryLightEnvIndex].numIndices == 1 + && comWorld_ptr->primaryLightEnvs[oldPrimaryLightEnvIndex].primaryLightIndices[0] >= 2048 - (*s_world)->lastSunPrimaryLightIndex) { return true; } - if (comWorld->primaryLightEnvs[newPrimaryLightEnvIndex].numIndices == 1 - && comWorld->primaryLightEnvs[newPrimaryLightEnvIndex].primaryLightIndices[0] >= 2048 + if (comWorld_ptr->primaryLightEnvs[newPrimaryLightEnvIndex].numIndices == 1 + && comWorld_ptr->primaryLightEnvs[newPrimaryLightEnvIndex].primaryLightIndices[0] >= 2048 - (*s_world)->lastSunPrimaryLightIndex) { return false;