diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2023-12-20 13:24:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 14:24:07 +0100 |
commit | 0438b5c8cfa99ac01c7e142d959aa40f88f1cc70 (patch) | |
tree | bbfdded20f8686cf188dba148db4b6c1b1211872 /NorthstarDLL/squirrel/squirrel.cpp | |
parent | 210dab2b0e5c686829bafdc857d2910f6b216b85 (diff) | |
download | NorthstarLauncher-0438b5c8cfa99ac01c7e142d959aa40f88f1cc70.tar.gz NorthstarLauncher-0438b5c8cfa99ac01c7e142d959aa40f88f1cc70.zip |
Cherry pick "remove unnecessary namespaces" from primedev (#618)v1.21.2-rc2
Cherry-picks the removal of unnecessary namespaces from `primedev`
https://github.com/F1F7Y/NorthstarPrime/
Co-authored-by: F1F7Y <filip.bartos07@proton.me>
Diffstat (limited to 'NorthstarDLL/squirrel/squirrel.cpp')
-rw-r--r-- | NorthstarDLL/squirrel/squirrel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/NorthstarDLL/squirrel/squirrel.cpp b/NorthstarDLL/squirrel/squirrel.cpp index d8eff0d6..ac9a2ce9 100644 --- a/NorthstarDLL/squirrel/squirrel.cpp +++ b/NorthstarDLL/squirrel/squirrel.cpp @@ -504,17 +504,17 @@ void __fastcall ScriptCompileErrorHook(HSquirrelVM* sqvm, const char* error, con } else { - R2::Cbuf_AddText( - R2::Cbuf_GetCurrentPlayer(), + Cbuf_AddText( + Cbuf_GetCurrentPlayer(), fmt::format("disconnect \"Encountered {} script compilation error, see console for details.\"", GetContextName(realContext)) .c_str(), - R2::cmd_source_t::kCommandSrcCode); + cmd_source_t::kCommandSrcCode); // likely temp: show console so user can see any errors, as error message wont display if ui is dead // maybe we could disable all mods other than the coremods and try a reload before doing this? // could also maybe do some vgui bullshit to show something visually rather than console if (realContext == ScriptContext::UI) - R2::Cbuf_AddText(R2::Cbuf_GetCurrentPlayer(), "showconsole", R2::cmd_source_t::kCommandSrcCode); + Cbuf_AddText(Cbuf_GetCurrentPlayer(), "showconsole", cmd_source_t::kCommandSrcCode); } } @@ -638,7 +638,7 @@ template <ScriptContext context, TemplateStringLiteral funcName> SQRESULT SQ_Stu template <ScriptContext context> void StubUnsafeSQFuncs() { - if (!Tier0::CommandLine()->CheckParm("-allowunsafesqfuncs")) + if (!CommandLine()->CheckParm("-allowunsafesqfuncs")) { g_pSquirrel<context>->AddFuncOverride("DevTextBufferWrite", SQ_StubbedFunc<context, "DevTextBufferWrite">); g_pSquirrel<context>->AddFuncOverride("DevTextBufferClear", SQ_StubbedFunc<context, "DevTextBufferClear">); |