diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index 6d72f81e4..59a32ccb2 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -46,6 +46,8 @@ EXTERN_CVAR (Bool, saveloadconfirmation) // [mxd] EXTERN_CVAR (Bool, quicksaverotation) +CVAR(Bool, m_quickexit, false, CVAR_ARCHIVE) + typedef void(*hfunc)(); DEFINE_ACTION_FUNCTION(DMessageBoxMenu, CallHandler) { @@ -85,9 +87,14 @@ DMenu *CreateMessageBoxMenu(DMenu *parent, const char *message, int messagemode, CCMD (menu_quit) { // F10 + if (m_quickexit) + { + ST_Endoom(); + } + M_StartControlPanel (true); - int messageindex = gametic % gameinfo.quitmessages.Size(); + const size_t messageindex = static_cast(gametic) % gameinfo.quitmessages.Size(); FString EndString; const char *msg = gameinfo.quitmessages[messageindex]; if (msg[0] == '$') diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 279b19dcb..c47b2d8cd 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1202,6 +1202,10 @@ OptionMenu "MiscOptions" protected SafeCommand "$MISCMNU_CLEARNODECACHE", "clearnodecache" StaticText " " Option "$OPTMNU_LANGUAGE", "language", "LanguageOptions" + + StaticText " " + Option "$MISCMNU_QUICKEXIT", "m_quickexit", "OnOff" + IfOption(Windows) { StaticText " "