aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/squirrel.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-27 04:27:26 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-27 04:27:26 +0100
commit64b8db08ed9bd9de5aae85aedbf07caf51cb819c (patch)
treeab9de693f02d318d942b595aebe206a550f1db2c /NorthstarDedicatedTest/squirrel.cpp
parent80428e6f62899162c036f2752edfbfd7d1adb80b (diff)
downloadNorthstarLauncher-64b8db08ed9bd9de5aae85aedbf07caf51cb819c.tar.gz
NorthstarLauncher-64b8db08ed9bd9de5aae85aedbf07caf51cb819c.zip
add pdata support, improve filesystem hooks
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.cpp')
-rw-r--r--NorthstarDedicatedTest/squirrel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/squirrel.cpp b/NorthstarDedicatedTest/squirrel.cpp
index 15c144c5..b57e22ae 100644
--- a/NorthstarDedicatedTest/squirrel.cpp
+++ b/NorthstarDedicatedTest/squirrel.cpp
@@ -89,18 +89,20 @@ void InitialiseClientSquirrel(HMODULE baseAddress)
void InitialiseServerSquirrel(HMODULE baseAddress)
{
g_ServerSquirrelManager = new SquirrelManager<SERVER>();
+ g_ServerSquirrelManager->AddFuncRegistration("void", "SavePdataForEntityIndex", "int i", "idk", NSTestFunc);
HookEnabler hook;
ServerSq_compilebuffer = (sq_compilebufferType)((char*)baseAddress + 0x3110);
ServerSq_pushroottable = (sq_pushroottableType)((char*)baseAddress + 0x5840);
ServerSq_call = (sq_callType)((char*)baseAddress + 0x8620);
- ServerRegisterSquirrelFunc = (RegisterSquirrelFuncType)((char*)baseAddress + 0x1DDD10);
+ ServerRegisterSquirrelFunc = (RegisterSquirrelFuncType)((char*)baseAddress + 0x1DD10);
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1FE90, &SQPrintHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerSQPrint)); // server print function
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x260E0, &CreateNewVMHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerCreateNewVM)); // server createnewvm function
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x26E20, &DestroyVMHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerDestroyVM)); // server destroyvm function
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x799E0, &ScriptCompileErrorHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerSQCompileError)); // server compileerror function
+ ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1D5C0, &CallScriptInitCallbackHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerCallScriptInitCallback)); // server callscriptinitcallback function
RegisterConCommand("script", ExecuteCodeCommand<SERVER>, "Executes script code on the server vm", FCVAR_GAMEDLL);
}