aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/scriptservertoclientstringcommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/scriptservertoclientstringcommand.cpp')
-rw-r--r--NorthstarDLL/scriptservertoclientstringcommand.cpp10
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))