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
1 changed files with 17 additions and 5 deletions

View File

@ -1078,12 +1078,24 @@ static int32_t VM_ResetPlayer(int const playerNum, int32_t vmFlags, int32_t cons
//AddLog("resetplayer"); //AddLog("resetplayer");
if (!g_netServer && ud.multimode < 2 && !(resetFlags & 2)) 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)
{ {
Menu_Open(playerNum); if (resetFlags & 4)
KB_ClearKeyDown(sc_Space); {
I_AdvanceTriggerClear(); KB_FlushKeyboardQueue();
Menu_Change(MENU_RESETPLAYER); 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; else g_player[playerNum].ps->gm = MODE_RESTART;
#if !defined LUNATIC #if !defined LUNATIC