Skip to content

Commit

Permalink
Merge Initialize the player for RAGE with manual shutdown (pr-2960)
Browse files Browse the repository at this point in the history
fcd6a31 - tweak(game/fivem/loadscreen): Initialize the player for RAGE with manual shutdown
  • Loading branch information
prikolium-cfx committed Dec 26, 2024
2 parents ba186da + fcd6a31 commit 3926dcf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/components/loading-screens-five/src/LoadingScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ static HookFunction hookFunction([]()

fx::ScriptEngine::RegisterNativeHandler("SHUTDOWN_LOADING_SCREEN_NUI", [=](fx::ScriptContext& ctx)
{
loadsThread.doSetup = true;

endLoadingScreens();
});

Expand Down Expand Up @@ -333,6 +331,14 @@ void LoadsThread::DoRun()
{
if (ShouldSkipLoading())
{
if (doShutdown && !autoShutdownNui)
{
// SET_ENTITY_COORDS Init the player for RAGE sake
NativeInvoke::Invoke<0x06843DA7060A026B, int>(NativeInvoke::Invoke<0xD80958FC74E988A6, int>(), 0.0f, 0.0f, 0.0f, false, false, false, false);

doShutdown = false;
}

return;
}

Expand Down

0 comments on commit 3926dcf

Please sign in to comment.