Skip to content

Commit

Permalink
finalize working patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkzy committed Jan 12, 2025
1 parent 36377a5 commit fa7c3ab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/client/component/map_patches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ namespace map_patches
WEAK game::symbol<void(float*)> Vec3Normalize{ 0x5E090, 0x68D20 };
WEAK game::symbol<int(int, float const* const, float const* const, struct game::Bounds const*, unsigned int, int)> SV_BrushModelSightTrace{ 0x19F830, 0x3370A0 };

game::symbol<game::ComWorld> comWorld{ 0xB49E518, 0xA97C0E0 };
game::symbol<game::ComWorld*> comWorld{ 0xECA078, 0x10B4528 };
game::symbol<game::GfxWorld*> s_world{ 0xF7A2BE0, 0xE973AE0 };

game::dvar_t* r_lightGridNonCompressed;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fa7c3ab

Please sign in to comment.