diff --git a/src/vscript/languages/squirrel_re/include/squirrel.h b/src/vscript/languages/squirrel_re/include/squirrel.h index 74a268cb..5bc73f6e 100644 --- a/src/vscript/languages/squirrel_re/include/squirrel.h +++ b/src/vscript/languages/squirrel_re/include/squirrel.h @@ -60,6 +60,7 @@ typedef uint64 SQHash; /*should be the same size of a pointer*/ typedef float SQFloat; typedef void* SQFunctor; +typedef void* SQEntity; typedef SQUnsignedInteger SQBool; typedef SQInteger SQRESULT; @@ -231,6 +232,7 @@ inline SQRESULT(*v_sq_pushstructure)(HSQUIRRELVM v, const SQChar* name, const SQ inline SQRESULT(*v_sq_compilebuffer)(HSQUIRRELVM v, SQBufState* bufferstate, const SQChar* buffer, SQInteger level, SQBool raiseerror); inline SQRESULT(*v_sq_call)(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror); inline SQRESULT(*v_sq_get)(HSQUIRRELVM v, SQInteger idx); +inline bool (*v_sq_getentity)(HSQUIRRELVM v, SQEntity* ent); inline SQRESULT (*v_sq_startconsttable)(HSQUIRRELVM v); inline SQRESULT (*v_sq_endconsttable)(HSQUIRRELVM v); @@ -261,6 +263,7 @@ class VSquirrelAPI : public IDetour LogFunAdr("sq_compilebuffer", v_sq_compilebuffer); LogFunAdr("sq_call", v_sq_call); LogFunAdr("sq_get", v_sq_get); + LogFunAdr("sq_getentity", v_sq_getentity); LogFunAdr("sq_startconsttable", v_sq_startconsttable); LogFunAdr("sq_endconsttable", v_sq_endconsttable); @@ -285,6 +288,7 @@ class VSquirrelAPI : public IDetour g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 57 41 56 41 57 48 83 EC 50 41 8B E9 49 8B F8").GetPtr(v_sq_compilebuffer); g_GameDll.FindPatternSIMD("4C 8B DC 49 89 5B 08 49 89 6B 10 49 89 73 18 57 48 83 EC 50 8B F2").GetPtr(v_sq_call); g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 40 48 8B F9 8B 49 78").GetPtr(v_sq_get); + g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 57 48 81 EC ?? ?? ?? ?? 48 8B 41 ?? 48 8B FA 48 8B D9 F7 00").GetPtr(v_sq_getentity); g_GameDll.FindPatternSIMD("8B 51 78 4C 8B 49 60 44 8B C2 49 C1 E0 04 4C 03 81 ?? ?? ?? ?? 8D 42 01 89 41 78 41 F7 81 ?? ?? ?? ?? ?? ?? ?? ?? 74 0A 49 8B 81 ?? ?? ?? ?? FF 40 08 41 F7 00 ?? ?? ?? ?? 41 0F 10 81 ?? ?? ?? ?? 74 15").GetPtr(v_sq_startconsttable); g_GameDll.FindPatternSIMD("8B 41 78 45 33 C0 FF C8 8B D0 89 41 78 48 C1 E2 04 48 03 91 ?? ?? ?? ?? 8B 02 48 C7 02 ?? ?? ?? ?? 25 ?? ?? ?? ?? 74 15").GetPtr(v_sq_endconsttable);