Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(streaming/five): CInteriorProxy cache pattern for b2545+
The 'save' and 'load' pattern pointed to the exact same function, and
not the 'load' function.

This would lead to a state where the map data file would not get loaded
early but the interior proxies defined in the cache file would also not
exist, so the game would crash when trying to instantiate the MLO inst.

Reported on https://forum.cfx.re/t/4940689/6.
  • Loading branch information
blattersturm committed Nov 17, 2022
1 parent 108322e commit 6e1e72f
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions code/components/gta-streaming-five/src/CacheLoader.cpp
Expand Up @@ -184,16 +184,7 @@ static HookFunction hookFunction([]()

// CInteriorProxy module
hook::call(hook::get_pattern("48 8D 8C 24 C0 00 00 00 8B D0 E8", 10), GetCacheIndex); // save

if (xbr::IsGameBuildOrGreater<2545>())
{
hook::call(hook::get_pattern("48 8D 8C 24 C0 00 00 00 8B D0 E8", 10), GetCacheIndex); // load

}
else
{
hook::call(hook::get_pattern("48 8D 8D 88 00 00 00 8B D0 E8", 9), GetCacheIndex); // load
}
hook::call(hook::get_pattern("48 8D 8D ? 00 00 00 8B D0 E8 ? ? ? ? 44 8B", 9), GetCacheIndex); // load
}

{
Expand Down

0 comments on commit 6e1e72f

Please sign in to comment.