Check if you are playing a game then execute `LUAh_GameQuit` if you are in Command_quit_f and Command_ExitGame_f

This commit is contained in:
Zachary McAlpin 2020-03-15 10:34:43 -05:00
parent 2959e3d299
commit 564ecf4f0f

View file

@ -3574,6 +3574,10 @@ static void Command_Playintro_f(void)
*/ */
FUNCNORETURN static ATTRNORETURN void Command_Quit_f(void) FUNCNORETURN static ATTRNORETURN void Command_Quit_f(void)
{ {
#ifdef HAVE_BLUA
if (Playing())
LUAh_GameQuit();
#endif
I_Quit(); I_Quit();
} }
@ -4236,7 +4240,7 @@ void Command_ExitGame_f(void)
INT32 i; INT32 i;
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
if (maptol) if (Playing())
LUAh_GameQuit(); LUAh_GameQuit();
#endif #endif