From bdd02b07e6fb8588b5d6e42234806bca44d633de Mon Sep 17 00:00:00 2001
From: Ace Lite <47698279+Ace-Lite@users.noreply.github.com>
Date: Sat, 30 Mar 2024 15:29:24 +0100
Subject: [PATCH] Intertype added into hook arguments

---
 src/lua_hooklib.c | 2 ++
 src/lua_hudlib.c  | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c
index 8d5959bf77..b3ad0db311 100644
--- a/src/lua_hooklib.c
+++ b/src/lua_hooklib.c
@@ -17,6 +17,7 @@
 #include "r_skins.h"
 #include "b_bot.h"
 #include "z_zone.h"
+#include "y_inter.h"
 
 #include "lua_script.h"
 #include "lua_libs.h"
@@ -1068,6 +1069,7 @@ int LUA_HookIntermissionThinker(boolean pstagefailed, INT32 intertic, INT32 tall
 		lua_pushinteger(gL, intertic);
 		lua_pushinteger(gL, tallydonetic);
 		lua_pushinteger(gL, endtic);
+		lua_pushinteger(gL, intertype);
 		call_hooks(&hook, 1, res_force);
 	}
 	return hook.status;
diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c
index 07f9d1f75a..9a0db2c677 100644
--- a/src/lua_hudlib.c
+++ b/src/lua_hudlib.c
@@ -1515,6 +1515,6 @@ void LUA_SetHudHook(int hook, huddrawlist_h list)
 			lua_pushinteger(gL, interlasttic);
 			lua_pushinteger(gL, interlasttallyendtic);
 			lua_pushinteger(gL, interlastendtic);
-
+			lua_pushinteger(gL, intertype);
 	}
 }
-- 
GitLab