mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Avoid potential crash for unloading rpaks.
This commit is contained in:
parent
2045f52ad8
commit
5939c00fe1
@ -91,7 +91,7 @@ FORCEINLINE void CHostState::FrameUpdate(void* rcx, void* rdx, float time)
|
||||
case HostStates_t::HS_CHANGE_LEVEL_MP:
|
||||
{
|
||||
g_pHostState->State_ChangeLevelMP();
|
||||
g_pHostState->UnloadPakFile(); // Unload our loaded rpaks. Calling this before the actual level change happens kills the game.
|
||||
g_pHostState->UnloadPakFile();
|
||||
break;
|
||||
}
|
||||
case HostStates_t::HS_RUN:
|
||||
@ -103,9 +103,9 @@ FORCEINLINE void CHostState::FrameUpdate(void* rcx, void* rdx, float time)
|
||||
{
|
||||
DevMsg(eDLL_T::ENGINE, "%s - Shutdown host game\n", "CHostState::FrameUpdate");
|
||||
|
||||
g_pHostState->UnloadPakFile();
|
||||
g_bLevelResourceInitialized = false;
|
||||
Host_Game_ShutdownFn(g_pHostState);
|
||||
g_pHostState->UnloadPakFile();
|
||||
break;
|
||||
}
|
||||
case HostStates_t::HS_RESTART:
|
||||
|
Loading…
x
Reference in New Issue
Block a user