From 42ef6ef2285600317786396ebd537004bbe2fbf1 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 31 Mar 2022 00:10:18 +0200 Subject: [PATCH] Hook sq_pushroottable as well --- r5dev/squirrel/sqapi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r5dev/squirrel/sqapi.cpp b/r5dev/squirrel/sqapi.cpp index 61a76072..8463f348 100644 --- a/r5dev/squirrel/sqapi.cpp +++ b/r5dev/squirrel/sqapi.cpp @@ -84,6 +84,7 @@ SQRESULT sq_call(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerr void SQAPI_Attach() { + DetourAttach((LPVOID*)&v_sq_pushroottable, &sq_pushroottable); DetourAttach((LPVOID*)&v_sq_pushbool, &sq_pushbool); DetourAttach((LPVOID*)&v_sq_pushstring, &sq_pushstring); DetourAttach((LPVOID*)&v_sq_pushinteger, &sq_pushinteger); @@ -99,6 +100,7 @@ void SQAPI_Attach() void SQAPI_Detach() { + DetourDetach((LPVOID*)&v_sq_pushroottable, &sq_pushroottable); DetourDetach((LPVOID*)&v_sq_pushbool, &sq_pushbool); DetourDetach((LPVOID*)&v_sq_pushstring, &sq_pushstring); DetourDetach((LPVOID*)&v_sq_pushinteger, &sq_pushinteger);