diff options
author | Emma Miler <emma.pi@protonmail.com> | 2022-11-21 00:38:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-20 23:38:42 +0000 |
commit | 9e469ac28b610ecb8bce3e6c279660fae78861cf (patch) | |
tree | 57274f3be03cb160e42af7ed939274a2a028dbf0 /NorthstarDLL/scriptservertoclientstringcommand.cpp | |
parent | 70b71ba3d3ad7121c6aabe55271542f55abe4008 (diff) | |
download | NorthstarLauncher-9e469ac28b610ecb8bce3e6c279660fae78861cf.tar.gz NorthstarLauncher-9e469ac28b610ecb8bce3e6c279660fae78861cf.zip |
Squirrel bridge v3 (#310)
* Initial
* Move squirrelmanager to virtual base class
* Implement changes from code review
* Formatting
* Update squirrel.cpp
* Formatting shit
* Fix filters
* Fix up
Use new squirrel autobind syntax
Move from `std::vector` to `std::queue` for message buffer
Add `NSTestMessageBuffer`
* Update squirrel.cpp
* Update squirrel.h
* Remove inline virtual final because this is stupid
I probably had a bit of a brain fart when this was written
* Moved to running ProcessMessages in-engine
* Remove TestMessageBuffer
* Formatting
* Rename pushSQObject -> pushobject
* Rename some stuff
* Update squirrel.h
* Formattting
* Remove unneeded global access
* Oops
Diffstat (limited to 'NorthstarDLL/scriptservertoclientstringcommand.cpp')
-rw-r--r-- | NorthstarDLL/scriptservertoclientstringcommand.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/NorthstarDLL/scriptservertoclientstringcommand.cpp b/NorthstarDLL/scriptservertoclientstringcommand.cpp index 5c116973..ac19c3af 100644 --- a/NorthstarDLL/scriptservertoclientstringcommand.cpp +++ b/NorthstarDLL/scriptservertoclientstringcommand.cpp @@ -5,14 +5,8 @@ void ConCommand_ns_script_servertoclientstringcommand(const CCommand& arg) { - if (g_pSquirrel<ScriptContext::CLIENT>->m_pSQVM && - g_pSquirrel<ScriptContext::CLIENT>->setupfunc("NSClientCodeCallback_RecievedServerToClientStringCommand") != SQRESULT_ERROR) - { - g_pSquirrel<ScriptContext::CLIENT>->pushstring(g_pSquirrel<ScriptContext::CLIENT>->m_pSQVM->sqvm, arg.ArgS()); - g_pSquirrel<ScriptContext::CLIENT>->call( - g_pSquirrel<ScriptContext::CLIENT>->m_pSQVM->sqvm, - 1); // todo: doesn't throw or log errors from within this, probably not great behaviour - } + if (g_pSquirrel<ScriptContext::CLIENT>->m_pSQVM) + g_pSquirrel<ScriptContext::CLIENT>->Call("NSClientCodeCallback_RecievedServerToClientStringCommand", arg.ArgS()); } ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ScriptServerToClientStringCommand, ClientSquirrel, (CModule module)) |