mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix crash during RPak load
* Added missing parameter to 'PakLoadFuncs_s::WaitAsync'. * Fix offset to 'g_pakLoadApi'.
This commit is contained in:
parent
6215fd5dc6
commit
3fd898bf30
@ -23,7 +23,7 @@ InitReturnVal_t CMaterialSystem::Init(CMaterialSystem* thisptr)
|
||||
// Only load the 'startup.rpak' file, as 'common_early.rpak' has assets
|
||||
// that references assets in 'startup.rpak'.
|
||||
RPakHandle_t pakHandle = g_pakLoadApi->LoadAsync("startup.rpak", AlignedMemAlloc(), 5, 0);
|
||||
g_pakLoadApi->WaitAsync(pakHandle);
|
||||
g_pakLoadApi->WaitAsync(pakHandle, nullptr);
|
||||
|
||||
// Trick: return INIT_FAILED to disable the loading of hardware
|
||||
// configuration data, since we don't need it on the dedi.
|
||||
|
@ -32,7 +32,7 @@ typedef struct PakLoadFuncs_s
|
||||
char unknown2[16];
|
||||
void* Func7;
|
||||
void* Func8;
|
||||
RPakStatus_t(*WaitAsync)(RPakHandle_t handle);
|
||||
RPakStatus_t(*WaitAsync)(RPakHandle_t handle, void* pFinishCallback);
|
||||
void* Func10;
|
||||
void* Func11;
|
||||
void* FindByGUID;
|
||||
@ -92,7 +92,7 @@ class V_RTechGame : public IDetour
|
||||
}
|
||||
virtual void GetVar(void) const
|
||||
{
|
||||
g_pakLoadApi = p_LauncherMain.Offset(0x800).FindPatternSelf("48 8D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<PakLoadFuncs_t*>();
|
||||
g_pakLoadApi = p_LauncherMain.Offset(0x820).FindPatternSelf("48 89").ResolveRelativeAddressSelf(0x3, 0x7).RCast<PakLoadFuncs_t*>();
|
||||
}
|
||||
virtual void GetCon(void) const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user