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/dedicated/dedicatedlogtoclient.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/dedicated/dedicatedlogtoclient.cpp')
-rw-r--r-- | NorthstarDLL/dedicated/dedicatedlogtoclient.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/NorthstarDLL/dedicated/dedicatedlogtoclient.cpp b/NorthstarDLL/dedicated/dedicatedlogtoclient.cpp index a48b1b39..bf2cf77a 100644 --- a/NorthstarDLL/dedicated/dedicatedlogtoclient.cpp +++ b/NorthstarDLL/dedicated/dedicatedlogtoclient.cpp @@ -1,11 +1,11 @@ #include "dedicatedlogtoclient.h" #include "engine/r2engine.h" -void (*CGameClient__ClientPrintf)(R2::CBaseClient* pClient, const char* fmt, ...); +void (*CGameClient__ClientPrintf)(CBaseClient* pClient, const char* fmt, ...); void DedicatedServerLogToClientSink::custom_sink_it_(const custom_log_msg& msg) { - if (*R2::g_pServerState == R2::server_state_t::ss_dead) + if (*g_pServerState == server_state_t::ss_dead) return; enum class eSendPrintsToClient @@ -15,17 +15,17 @@ void DedicatedServerLogToClientSink::custom_sink_it_(const custom_log_msg& msg) ALL }; - static const ConVar* Cvar_dedi_sendPrintsToClient = R2::g_pCVar->FindVar("dedi_sendPrintsToClient"); + static const ConVar* Cvar_dedi_sendPrintsToClient = g_pCVar->FindVar("dedi_sendPrintsToClient"); eSendPrintsToClient eSendPrints = static_cast<eSendPrintsToClient>(Cvar_dedi_sendPrintsToClient->GetInt()); if (eSendPrints == eSendPrintsToClient::NONE) return; std::string sLogMessage = fmt::format("[DEDICATED SERVER] [{}] {}", level_names[msg.level], msg.payload); - for (int i = 0; i < R2::g_pGlobals->m_nMaxClients; i++) + for (int i = 0; i < g_pGlobals->m_nMaxClients; i++) { - R2::CBaseClient* pClient = &R2::g_pClientArray[i]; + CBaseClient* pClient = &g_pClientArray[i]; - if (pClient->m_Signon >= R2::eSignonState::CONNECTED) + if (pClient->m_Signon >= eSignonState::CONNECTED) { CGameClient__ClientPrintf(pClient, sLogMessage.c_str()); @@ -44,5 +44,5 @@ void DedicatedServerLogToClientSink::flush_() {} ON_DLL_LOAD_DEDI("engine.dll", DedicatedServerLogToClient, (CModule module)) { - CGameClient__ClientPrintf = module.Offset(0x1016A0).RCast<void (*)(R2::CBaseClient*, const char*, ...)>(); + CGameClient__ClientPrintf = module.Offset(0x1016A0).RCast<void (*)(CBaseClient*, const char*, ...)>(); } |