From 0438b5c8cfa99ac01c7e142d959aa40f88f1cc70 Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:24:07 +0000 Subject: Cherry pick "remove unnecessary namespaces" from primedev (#618) Cherry-picks the removal of unnecessary namespaces from `primedev` https://github.com/F1F7Y/NorthstarPrime/ Co-authored-by: F1F7Y --- NorthstarDLL/squirrel/squirrel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'NorthstarDLL/squirrel') 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 SQRESULT SQ_Stu template void StubUnsafeSQFuncs() { - if (!Tier0::CommandLine()->CheckParm("-allowunsafesqfuncs")) + if (!CommandLine()->CheckParm("-allowunsafesqfuncs")) { g_pSquirrel->AddFuncOverride("DevTextBufferWrite", SQ_StubbedFunc); g_pSquirrel->AddFuncOverride("DevTextBufferClear", SQ_StubbedFunc); -- cgit v1.2.3