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/util/printmaps.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/util/printmaps.cpp')
-rw-r--r-- | NorthstarDLL/util/printmaps.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/NorthstarDLL/util/printmaps.cpp b/NorthstarDLL/util/printmaps.cpp index bf9f1dec..d3253605 100644 --- a/NorthstarDLL/util/printmaps.cpp +++ b/NorthstarDLL/util/printmaps.cpp @@ -42,10 +42,10 @@ void RefreshMapList() // Only update the maps list every 10 seconds max to we avoid constantly reading fs static double fLastRefresh = -999; - if (fLastRefresh + 10.0 > R2::g_pGlobals->m_flRealTime) + if (fLastRefresh + 10.0 > g_pGlobals->m_flRealTime) return; - fLastRefresh = R2::g_pGlobals->m_flRealTime; + fLastRefresh = g_pGlobals->m_flRealTime; // Rebuild map list vMapList.clear(); @@ -110,7 +110,7 @@ void RefreshMapList() } // get maps in game dir - std::string gameDir = fmt::format("{}/maps", R2::g_pModName); + std::string gameDir = fmt::format("{}/maps", g_pModName); if (!std::filesystem::exists(gameDir)) { return; @@ -212,7 +212,7 @@ AUTOHOOK(Host_Map_f, engine.dll + 0x15B340, void, __fastcall, (const CCommand& a return; } - if (*R2::g_pServerState >= R2::server_state_t::ss_active) + if (*g_pServerState >= server_state_t::ss_active) return Host_Changelevel_f(args); else return Host_Map_helper(args, nullptr); @@ -222,7 +222,7 @@ void InitialiseMapsPrint() { AUTOHOOK_DISPATCH() - ConCommand* mapsCommand = R2::g_pCVar->FindCommand("maps"); + ConCommand* mapsCommand = g_pCVar->FindCommand("maps"); mapsCommand->m_pCommandCallback = ConCommand_maps; } |