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/scripts/client/clientchathooks.cpp | 2 +- NorthstarDLL/scripts/client/scriptserverbrowser.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'NorthstarDLL/scripts/client') diff --git a/NorthstarDLL/scripts/client/clientchathooks.cpp b/NorthstarDLL/scripts/client/clientchathooks.cpp index df9497ef..e084f47e 100644 --- a/NorthstarDLL/scripts/client/clientchathooks.cpp +++ b/NorthstarDLL/scripts/client/clientchathooks.cpp @@ -30,7 +30,7 @@ void, __fastcall, (void* self, const char* message, int inboxId, bool isTeam, bo payload = message + 1; } - NS::Utils::RemoveAsciiControlSequences(const_cast(message), true); + RemoveAsciiControlSequences(const_cast(message), true); SQRESULT result = g_pSquirrel->Call( "CHudChat_ProcessMessageStartThread", static_cast(senderId) - 1, payload, isTeam, isDead, type); diff --git a/NorthstarDLL/scripts/client/scriptserverbrowser.cpp b/NorthstarDLL/scripts/client/scriptserverbrowser.cpp index 1945b3dc..a142c3f4 100644 --- a/NorthstarDLL/scripts/client/scriptserverbrowser.cpp +++ b/NorthstarDLL/scripts/client/scriptserverbrowser.cpp @@ -62,7 +62,7 @@ ADD_SQFUNC("void", NSTryAuthWithServer, "int serverIndex, string password = ''", // do auth g_pMasterServerManager->AuthenticateWithServer( - R2::g_pLocalPlayerUserID, + g_pLocalPlayerUserID, g_pMasterServerManager->m_sOwnClientAuthToken, g_pMasterServerManager->m_vRemoteServers[serverIndex], (char*)password); @@ -95,9 +95,9 @@ ADD_SQFUNC("void", NSConnectToAuthedServer, "", "", ScriptContext::UI) // set auth token, then try to connect // i'm honestly not entirely sure how silentconnect works regarding ports and encryption so using connect for now - R2::g_pCVar->FindVar("serverfilter")->SetValue(info.authToken); - R2::Cbuf_AddText( - R2::Cbuf_GetCurrentPlayer(), + g_pCVar->FindVar("serverfilter")->SetValue(info.authToken); + Cbuf_AddText( + Cbuf_GetCurrentPlayer(), fmt::format( "connect {}.{}.{}.{}:{}", info.ip.S_un.S_un_b.s_b1, @@ -106,7 +106,7 @@ ADD_SQFUNC("void", NSConnectToAuthedServer, "", "", ScriptContext::UI) info.ip.S_un.S_un_b.s_b4, info.port) .c_str(), - R2::cmd_source_t::kCommandSrcCode); + cmd_source_t::kCommandSrcCode); g_pMasterServerManager->m_bHasPendingConnectionInfo = false; return SQRESULT_NULL; @@ -115,7 +115,7 @@ ADD_SQFUNC("void", NSConnectToAuthedServer, "", "", ScriptContext::UI) ADD_SQFUNC("void", NSTryAuthWithLocalServer, "", "", ScriptContext::UI) { // do auth request - g_pMasterServerManager->AuthenticateWithOwnServer(R2::g_pLocalPlayerUserID, g_pMasterServerManager->m_sOwnClientAuthToken); + g_pMasterServerManager->AuthenticateWithOwnServer(g_pLocalPlayerUserID, g_pMasterServerManager->m_sOwnClientAuthToken); return SQRESULT_NULL; } @@ -125,7 +125,7 @@ ADD_SQFUNC("void", NSCompleteAuthWithLocalServer, "", "", ScriptContext::UI) // literally just set serverfilter // note: this assumes we have no authdata other than our own if (g_pServerAuthentication->m_RemoteAuthenticationData.size()) - R2::g_pCVar->FindVar("serverfilter")->SetValue(g_pServerAuthentication->m_RemoteAuthenticationData.begin()->first.c_str()); + g_pCVar->FindVar("serverfilter")->SetValue(g_pServerAuthentication->m_RemoteAuthenticationData.begin()->first.c_str()); return SQRESULT_NULL; } -- cgit v1.2.3