From f9559b609dd222891a9087bc683eac30920ca133 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:59:57 +0100 Subject: [PATCH] ImGui: fix server visibility bug If host status is set to offline after the server is launched, the browser would continue to broadcast the server. This patch makes sure that if the visibility has been set to offline, the server would no longer be broadcasted to the master server. --- src/gameui/IBrowser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameui/IBrowser.cpp b/src/gameui/IBrowser.cpp index 91cc775a..b68b43a3 100644 --- a/src/gameui/IBrowser.cpp +++ b/src/gameui/IBrowser.cpp @@ -707,7 +707,7 @@ void CBrowser::UpdateHostingStatus(void) #ifndef CLIENT_DLL assert(g_pHostState && g_pCVar); - const HostStatus_e hostStatus = g_pServer->IsActive() + const HostStatus_e hostStatus = (g_ServerHostManager.GetVisibility() != ServerVisibility_e::OFFLINE && g_pServer->IsActive()) ? HostStatus_e::HOSTING : HostStatus_e::NOT_HOSTING;