From 9dd49af1dc7737342e3aec0b50642eafc587c886 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 14 Sep 2022 21:59:32 +0200 Subject: [PATCH] Reset idle name on shutdown --- r5dev/engine/host_state.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/r5dev/engine/host_state.cpp b/r5dev/engine/host_state.cpp index e925f9c1..6775bca1 100644 --- a/r5dev/engine/host_state.cpp +++ b/r5dev/engine/host_state.cpp @@ -321,6 +321,7 @@ FORCEINLINE void CHostState::GameShutDown(void) g_pServerGameDLL->GameShutdown(); #endif // !CLIENT_DLL m_bActiveGame = 0; + ResetLevelName(); } } @@ -424,9 +425,9 @@ FORCEINLINE void CHostState::State_ChangeLevelMP(void) FORCEINLINE void CHostState::ResetLevelName(void) { #ifdef DEDICATED - const char* szNoMap = "server_idle"; + static const char* szNoMap = "server_idle"; #else // DEDICATED - const char* szNoMap = "main_menu"; + static const char* szNoMap = "main_menu"; #endif Q_snprintf(const_cast(m_levelName), sizeof(m_levelName), szNoMap); }