From d82467690bb19df5e96a8cce679d81d291b7ea78 Mon Sep 17 00:00:00 2001 From: rexx <67599507+r-ex@users.noreply.github.com> Date: Tue, 2 May 2023 19:56:12 +0100 Subject: [PATCH] re-add RSON compile list hooks --- r5dev/squirrel/sqscript.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/r5dev/squirrel/sqscript.cpp b/r5dev/squirrel/sqscript.cpp index a1fead17..505071a3 100644 --- a/r5dev/squirrel/sqscript.cpp +++ b/r5dev/squirrel/sqscript.cpp @@ -425,6 +425,13 @@ void VSquirrelVM::Attach() const DetourAttach((LPVOID*)&v_Script_DestroySignalEntryListHead, &Script_DestroySignalEntryListHead); DetourAttach((LPVOID*)&v_Script_LoadRson, &Script_LoadRson); DetourAttach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript); + +#ifndef DEDICATED + DetourAttach((LPVOID*)&v_CSquirrelVM_CompileUICLScripts, &CSquirrelVM_CompileUICLScripts); +#endif +#ifndef CLIENT_DLL + DetourAttach((LPVOID*)&v_CSquirrelVM_CompileSVScripts, &CSquirrelVM_CompileSVScripts); +#endif } //--------------------------------------------------------------------------------- void VSquirrelVM::Detach() const @@ -435,4 +442,11 @@ void VSquirrelVM::Detach() const DetourDetach((LPVOID*)&v_Script_DestroySignalEntryListHead, &Script_DestroySignalEntryListHead); DetourDetach((LPVOID*)&v_Script_LoadRson, &Script_LoadRson); DetourDetach((LPVOID*)&v_Script_LoadScript, &Script_LoadScript); + +#ifndef DEDICATED + DetourDetach((LPVOID*)&v_CSquirrelVM_CompileUICLScripts, &CSquirrelVM_CompileUICLScripts); +#endif +#ifndef CLIENT_DLL + DetourDetach((LPVOID*)&v_CSquirrelVM_CompileSVScripts, &CSquirrelVM_CompileSVScripts); +#endif }