TryRunTics: Handle deferred title/credits continue outside inner tic loop, don't bail outside of level gamestate

Fixes netxcmds not being processed locally in time to init rivals properly
This commit is contained in:
toaster 2024-05-02 20:28:15 +01:00
parent 32c43044cb
commit 3a8de19aa4

View file

@ -6150,27 +6150,21 @@ boolean TryRunTics(tic_t realtics)
ps_tictime = I_GetPreciseTime() - ps_tictime;
if (F_IsDeferredContinueCredits())
{
F_ContinueCredits();
}
if (D_IsDeferredStartTitle())
{
D_StartTitle();
}
// Leave a certain amount of tics present in the net buffer as long as we've ran at least one tic this frame.
if (client && gamestate == GS_LEVEL && leveltime > 1 && neededtic <= gametic + cv_netticbuffer.value)
{
break;
}
}
// if we're no longer in a level state, just exit
if (!G_GamestateUsesLevel())
{
break;
}
if (F_IsDeferredContinueCredits())
{
F_ContinueCredits();
}
if (D_IsDeferredStartTitle())
{
D_StartTitle();
}
}
else