diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-25 04:43:11 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-07-25 04:43:11 +0100 |
commit | 153e7f564c4bb1d5da200f2aecdca7c8d1836997 (patch) | |
tree | 2d49d5848b57d963e2b1551d55ce336383226fad /NorthstarDedicatedTest/squirrel.cpp | |
parent | 844e12403400b455fe5df8c2e19145a2ed1a7d45 (diff) | |
download | NorthstarLauncher-153e7f564c4bb1d5da200f2aecdca7c8d1836997.tar.gz NorthstarLauncher-153e7f564c4bb1d5da200f2aecdca7c8d1836997.zip |
wasted a day working on something that didn't end up working, rework some modloader code
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.cpp')
-rw-r--r-- | NorthstarDedicatedTest/squirrel.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/NorthstarDedicatedTest/squirrel.cpp b/NorthstarDedicatedTest/squirrel.cpp index 4462eb7f..d999ef0d 100644 --- a/NorthstarDedicatedTest/squirrel.cpp +++ b/NorthstarDedicatedTest/squirrel.cpp @@ -123,14 +123,14 @@ template<Context context> void* CreateNewVMHook(void* a1, Context realContext) sqvm = ClientCreateNewVM(a1, realContext); if (realContext == UI) - g_UISquirrelManager->sqvm = sqvm; + g_UISquirrelManager->VMCreated(sqvm); else - g_ClientSquirrelManager->sqvm = sqvm; + g_ClientSquirrelManager->VMCreated(sqvm) } else if (context == SERVER) { sqvm = ServerCreateNewVM(a1, context); - g_ServerSquirrelManager->sqvm = sqvm; + g_ServerSquirrelManager->VMCreated(sqvm); } spdlog::info("CreateNewVM {} {}", GetContextName(realContext), sqvm); @@ -144,18 +144,18 @@ template<Context context> void DestroyVMHook(void* a1, void* sqvm) if (context == CLIENT) { if (g_ClientSquirrelManager->sqvm == sqvm) - g_ClientSquirrelManager->sqvm = nullptr; + g_ClientSquirrelManager->VMDestroyed(); else if (g_UISquirrelManager->sqvm == sqvm) { - g_UISquirrelManager->sqvm = nullptr; - realContext == UI; + g_UISquirrelManager->VMDestroyed(); + realContext = UI; } ClientDestroyVM(a1, sqvm); } else if (context == SERVER) { - g_ServerSquirrelManager->sqvm = nullptr; + g_ServerSquirrelManager->VMDestroyed(); ServerDestroyVM(a1, sqvm); } |