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.
This commit is contained in:
Kawe Mazidjatari 2024-03-10 01:59:57 +01:00
parent b8178e9299
commit a4d04c9357

View File

@ -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;