diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-20 21:18:55 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-20 21:18:55 +0000 |
commit | e2c028702096367c6d10f3659d4c11f598829e2c (patch) | |
tree | 5c552595b812ce2d6f2a412ee4cea5791bde95ef /NorthstarDedicatedTest/squirrel.h | |
parent | 6cacfd312ad4f433fa5acd3e1dc6383ca5685211 (diff) | |
download | NorthstarLauncher-e2c028702096367c6d10f3659d4c11f598829e2c.tar.gz NorthstarLauncher-e2c028702096367c6d10f3659d4c11f598829e2c.zip |
auth fix and typo fix
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.h')
-rw-r--r-- | NorthstarDedicatedTest/squirrel.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/NorthstarDedicatedTest/squirrel.h b/NorthstarDedicatedTest/squirrel.h index d02a0000..742c392c 100644 --- a/NorthstarDedicatedTest/squirrel.h +++ b/NorthstarDedicatedTest/squirrel.h @@ -60,7 +60,7 @@ struct SQFuncRegistration }; // core sqvm funcs -typedef SQRESULT(*sq_compilebufferType)(void* sqvm, CompileBufferState* compileBuffer, const char* file, int a1, ScriptContex a2); +typedef SQRESULT(*sq_compilebufferType)(void* sqvm, CompileBufferState* compileBuffer, const char* file, int a1, ScriptContext a2); extern sq_compilebufferType ClientSq_compilebuffer; extern sq_compilebufferType ServerSq_compilebuffer; @@ -126,7 +126,7 @@ typedef SQBool(*sq_getboolType)(void*, SQInteger stackpos); extern sq_getboolType ClientSq_getbool; extern sq_getboolType ServerSq_getbool; -template<ScriptContex context> class SquirrelManager +template<ScriptContext context> class SquirrelManager { private: std::vector<SQFuncRegistration*> m_funcRegistrations; @@ -148,7 +148,7 @@ public: { spdlog::info("Registering {} function {}", GetContextName(context), funcReg->squirrelFuncName); - if (context == ScriptContex::CLIENT || context == ScriptContex::UI) + if (context == ScriptContext::CLIENT || context == ScriptContext::UI) ClientRegisterSquirrelFunc(sqvm, funcReg, 1); else ServerRegisterSquirrelFunc(sqvm, funcReg, 1); @@ -176,21 +176,21 @@ public: CompileBufferState bufferState = CompileBufferState(strCode); SQRESULT compileResult; - if (context == ScriptContex::CLIENT || context == ScriptContex::UI) + if (context == ScriptContext::CLIENT || context == ScriptContext::UI) compileResult = ClientSq_compilebuffer(sqvm2, &bufferState, "console", -1, context); - else if (context == ScriptContex::SERVER) + else if (context == ScriptContext::SERVER) compileResult = ServerSq_compilebuffer(sqvm2, &bufferState, "console", -1, context); spdlog::info("sq_compilebuffer returned {}", compileResult); if (compileResult >= 0) { - if (context == ScriptContex::CLIENT || context == ScriptContex::UI) + if (context == ScriptContext::CLIENT || context == ScriptContext::UI) { ClientSq_pushroottable(sqvm2); SQRESULT callResult = ClientSq_call(sqvm2, 1, false, false); spdlog::info("sq_call returned {}", callResult); } - else if (context == ScriptContex::SERVER) + else if (context == ScriptContext::SERVER) { ServerSq_pushroottable(sqvm2); SQRESULT callResult = ServerSq_call(sqvm2, 1, false, false); @@ -222,6 +222,6 @@ public: } }; -extern SquirrelManager<ScriptContex::CLIENT>* g_ClientSquirrelManager; -extern SquirrelManager<ScriptContex::SERVER>* g_ServerSquirrelManager; -extern SquirrelManager<ScriptContex::UI>* g_UISquirrelManager;
\ No newline at end of file +extern SquirrelManager<ScriptContext::CLIENT>* g_ClientSquirrelManager; +extern SquirrelManager<ScriptContext::SERVER>* g_ServerSquirrelManager; +extern SquirrelManager<ScriptContext::UI>* g_UISquirrelManager;
\ No newline at end of file |