From 30788de692b33f27d0bd42ce42be7c07056cdfce Mon Sep 17 00:00:00 2001 From: PixieCore <41352111+PixieCore@users.noreply.github.com> Date: Thu, 12 May 2022 19:39:55 +0200 Subject: [PATCH] Fixed clientsdk compilation. --- r5dev/engine/host_state.cpp | 6 ++++++ r5dev/networksystem/pylon.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/r5dev/engine/host_state.cpp b/r5dev/engine/host_state.cpp index 817fabed..6e3e10e8 100644 --- a/r5dev/engine/host_state.cpp +++ b/r5dev/engine/host_state.cpp @@ -239,6 +239,7 @@ FORCEINLINE void CHostState::Think(void) const pylonTimer.Start(); } #endif // DEDICATED +#ifndef CLIENT_DLL if (statsTimer.GetDurationInProgress().GetSeconds() > sv_statusRefreshInterval->GetDouble()) { string svCurrentPlaylist = KeyValues_GetCurrentPlaylist(); @@ -249,6 +250,7 @@ FORCEINLINE void CHostState::Think(void) const statsTimer.Start(); } std::this_thread::sleep_for(std::chrono::milliseconds(50)); +#endif // !CLIENT_DLL } } @@ -336,11 +338,14 @@ FORCEINLINE void CHostState::State_NewGame(void) g_bLevelResourceInitialized = false; m_bSplitScreenConnect = false; +#ifndef CLIENT_DLL if (!g_pServerGameClients) // Init Game if it ain't valid. { SV_InitGameDLL(); } +#endif // !CLIENT_DLL +#ifndef CLIENT_DLL if (!CModelLoader__Map_IsValid(g_pModelLoader, m_levelName) // Check if map is valid and if we can start a new game. || !Host_NewGame(m_levelName, nullptr, m_bBackgroundLevel, m_bSplitScreenConnect, time) || !g_pServerGameClients) { @@ -350,6 +355,7 @@ FORCEINLINE void CHostState::State_NewGame(void) #endif // !DEDICATED GameShutDown(); } +#endif // !CLIENT_DLL m_iCurrentState = HostStates_t::HS_RUN; // Set current state to run. diff --git a/r5dev/networksystem/pylon.cpp b/r5dev/networksystem/pylon.cpp index ed5be347..1da167b4 100644 --- a/r5dev/networksystem/pylon.cpp +++ b/r5dev/networksystem/pylon.cpp @@ -20,6 +20,7 @@ //----------------------------------------------------------------------------- void KeepAliveToPylon() { +#ifndef CLIENT_DLL if (g_pHostState->m_bActiveGame && sv_pylonvisibility->GetBool()) // Check for active game. { std::string m_szHostToken = std::string(); @@ -39,4 +40,5 @@ void KeepAliveToPylon() } ); } +#endif // !CLIENT_DLL } \ No newline at end of file