CON: Add resetplayerflag 4, which always loads if possible

git-svn-id: https://svn.eduke32.com/eduke32@6677 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-02-20 11:55:13 +00:00
parent 60223012be
commit 26749bf881

View file

@ -1078,13 +1078,25 @@ static int32_t VM_ResetPlayer(int const playerNum, int32_t vmFlags, int32_t cons
//AddLog("resetplayer");
if (!g_netServer && ud.multimode < 2 && !(resetFlags & 2))
{
if (g_quickload && g_quickload->isValid() && ud.recstat != 2 && !(resetFlags & 1))
if (g_quickload && g_quickload->isValid() && ud.recstat != 2)
{
if (resetFlags & 4)
{
KB_FlushKeyboardQueue();
KB_ClearKeysDown();
FX_StopAllSounds();
S_ClearSoundLocks();
G_LoadPlayerMaybeMulti(*g_quickload);
}
else if (!(resetFlags & 1))
{
Menu_Open(playerNum);
KB_ClearKeyDown(sc_Space);
I_AdvanceTriggerClear();
Menu_Change(MENU_RESETPLAYER);
}
}
else g_player[playerNum].ps->gm = MODE_RESTART;
#if !defined LUNATIC
vmFlags |= VM_NOEXECUTE;