mirror of
https://github.com/R2Northstar/NorthstarLauncher
synced 2026-08-23 20:26:04 -04:00
* Untemplate g_pSquirrel so intellisense and stuff actually works with it * Remove unnecessary bitwise operations * Don't use ScriptContext_COUNT and treat INVALID as a valid flag
18 lines
630 B
C++
18 lines
630 B
C++
#include "squirrel/squirrel.h"
|
|
#include "core/convar/convar.h"
|
|
#include "core/convar/concommand.h"
|
|
|
|
void ConCommand_ns_script_servertoclientstringcommand(const CCommand& arg)
|
|
{
|
|
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))
|
|
{
|
|
RegisterConCommand(
|
|
"ns_script_servertoclientstringcommand",
|
|
ConCommand_ns_script_servertoclientstringcommand,
|
|
"",
|
|
FCVAR_CLIENTDLL | FCVAR_SERVER_CAN_EXECUTE);
|
|
}
|