From d69c999890f8f01b967ed33955332384bac85364 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Sat, 10 May 2025 06:26:51 -0400 Subject: [PATCH] Allow both Execute hooks in UDMF --- src/p_spec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 5cc241847..f737be3e1 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3459,10 +3459,13 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha if (stringargs[0]) { - if (line && !udmf) + if (line && mo && callsec) + { + // Allow running the old hook as well. LUA_HookLinedefExecute(line, mo, callsec); - else - LUA_HookSpecialExecute(activator, args, stringargs); + } + + LUA_HookSpecialExecute(activator, args, stringargs); } else CONS_Alert(CONS_WARNING, "Linedef %s is missing the hook name of the Lua function to call! (This should be given in stringarg0)\n", sizeu1(line-lines));