diff options
author | Tom Barham <me@cpdt.dev> | 2022-02-22 08:33:53 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 19:33:53 -0300 |
commit | 8c9f34283f8670dda98959d0785d682e6f652a93 (patch) | |
tree | 5e9d8c10fb5d1df2816fac43e4db3b80cc7f93a0 /NorthstarDedicatedTest/squirrel.cpp | |
parent | ae9df9bc734c6c0364028c71db5e7236e7c344dd (diff) | |
download | NorthstarLauncher-8c9f34283f8670dda98959d0785d682e6f652a93.tar.gz NorthstarLauncher-8c9f34283f8670dda98959d0785d682e6f652a93.zip |
Advanced chat: custom messages and client hooks (#74)
Co-authored-by: Emma Miler <27428383+emma-miler@users.noreply.github.com>
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.cpp')
-rw-r--r-- | NorthstarDedicatedTest/squirrel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/squirrel.cpp b/NorthstarDedicatedTest/squirrel.cpp index 20f99967..19c561c0 100644 --- a/NorthstarDedicatedTest/squirrel.cpp +++ b/NorthstarDedicatedTest/squirrel.cpp @@ -84,6 +84,9 @@ sq_getfloatType ServerSq_getfloat; sq_getboolType ClientSq_getbool; sq_getboolType ServerSq_getbool; +sq_getType ClientSq_sq_get; +sq_getType ServerSq_sq_get; + template <ScriptContext context> void ExecuteCodeCommand(const CCommand& args); // inits @@ -136,6 +139,8 @@ void InitialiseClientSquirrel(HMODULE baseAddress) ClientSq_getfloat = (sq_getfloatType)((char*)baseAddress + 0x6100); ClientSq_getbool = (sq_getboolType)((char*)baseAddress + 0x6130); + ClientSq_sq_get = (sq_getType)((char*)baseAddress + 0x7C30); + ENABLER_CREATEHOOK( hook, (char*)baseAddress + 0x26130, &CreateNewVMHook<ScriptContext::CLIENT>, reinterpret_cast<LPVOID*>(&ClientCreateNewVM)); // client createnewvm function @@ -175,6 +180,8 @@ void InitialiseServerSquirrel(HMODULE baseAddress) ServerSq_getfloat = (sq_getfloatType)((char*)baseAddress + 0x60E0); ServerSq_getbool = (sq_getboolType)((char*)baseAddress + 0x6110); + ServerSq_sq_get = (sq_getType)((char*)baseAddress + 0x7C00); + ENABLER_CREATEHOOK( hook, (char*)baseAddress + 0x1FE90, &SQPrintHook<ScriptContext::SERVER>, reinterpret_cast<LPVOID*>(&ServerSQPrint)); // server print function |