Light optimization

This commit is contained in:
Kawe Mazidjatari 2022-04-13 01:37:49 +02:00
parent 7ba4f4021b
commit 64f5935ba6
2 changed files with 4 additions and 4 deletions

View File

@ -248,8 +248,8 @@ FORCEINLINE void CHostState::Think(void) const
#endif // DEDICATED #endif // DEDICATED
if (statsTimer.GetDurationInProgress().GetSeconds() > sv_statusRefreshInterval->GetDouble()) if (statsTimer.GetDurationInProgress().GetSeconds() > sv_statusRefreshInterval->GetDouble())
{ {
std::string svCurrentPlaylist = KeyValues_GetCurrentPlaylist(); string svCurrentPlaylist = KeyValues_GetCurrentPlaylist();
std::int64_t nPlayerCount = g_pServer->GetNumHumanPlayers(); int32_t nPlayerCount = g_pServer->GetNumHumanPlayers();
SetConsoleTitleA(fmt::format("{} - {}/{} Players ({} on {})", SetConsoleTitleA(fmt::format("{} - {}/{} Players ({} on {})",
hostname->GetString(), nPlayerCount, g_ServerGlobalVariables->m_nMaxClients, svCurrentPlaylist.c_str(), m_levelName).c_str()); hostname->GetString(), nPlayerCount, g_ServerGlobalVariables->m_nMaxClients, svCurrentPlaylist.c_str(), m_levelName).c_str());
@ -315,7 +315,7 @@ FORCEINLINE void CHostState::GameShutDown(void)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: unloads all pakfiles loaded by the SDK // Purpose: unloads all pakfiles loaded by the SDK
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
FORCEINLINE void CHostState::UnloadPakFile(void) FORCEINLINE void CHostState::UnloadPakFile(void) const
{ {
for (auto& it : g_nLoadedPakFileId) for (auto& it : g_nLoadedPakFileId)
{ {

View File

@ -25,7 +25,7 @@ public:
FORCEINLINE void Think(void) const; FORCEINLINE void Think(void) const;
FORCEINLINE void GameShutDown(void); FORCEINLINE void GameShutDown(void);
FORCEINLINE void UnloadPakFile(void); FORCEINLINE void UnloadPakFile(void) const;
FORCEINLINE void State_NewGame(void); FORCEINLINE void State_NewGame(void);
FORCEINLINE void State_ChangeLevelSP(void); FORCEINLINE void State_ChangeLevelSP(void);