From 04553a03d8421ae99d40643cbd42fe8f7583e3fa Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 4 Aug 2025 09:27:45 +0200 Subject: [PATCH] compat: add return values to hooksecurefunc --- helpers.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helpers.lua b/helpers.lua index 3c842cb..3f710f9 100644 --- a/helpers.lua +++ b/helpers.lua @@ -99,12 +99,13 @@ ShaguTweaks.hooksecurefunc = function(tbl, name, func, prepend) if prepend then hooks[tostring(func)]["function"] = function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) hooks[tostring(func)]["new"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + return hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) end else hooks[tostring(func)]["function"] = function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + local r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 = hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) hooks[tostring(func)]["new"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + return r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 end end