From 28de6b1f93d853f87b4e5d5f7a97d57923f116ff Mon Sep 17 00:00:00 2001
From: Zachary McAlpin <choalover@gmail.com>
Date: Fri, 3 Apr 2020 17:44:57 -0500
Subject: [PATCH] Execute LUAh_GameQuit in 2 additional places in m_menu.c

---
 src/m_menu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/m_menu.c b/src/m_menu.c
index f8240d4031..0303b0de00 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -44,6 +44,7 @@
 #include "p_local.h"
 #include "p_setup.h"
 #include "f_finale.h"
+#include "lua_hook.h"
 
 #ifdef HWRENDER
 #include "hardware/hw_main.h"
@@ -6864,6 +6865,8 @@ static void M_SelectableClearMenus(INT32 choice)
 static void M_UltimateCheat(INT32 choice)
 {
 	(void)choice;
+	if (Playing())
+		LUAh_GameQuit();
 	I_Quit();
 }
 
@@ -12535,6 +12538,8 @@ void M_QuitResponse(INT32 ch)
 			I_Sleep();
 		}
 	}
+	if (Playing())
+		LUAh_GameQuit();
 	I_Quit();
 }
 
-- 
GitLab