From f530827325a1c7109ab505fe58f075c1163d93df Mon Sep 17 00:00:00 2001 From: nullsystem <15316579+nullsystem@users.noreply.github.com> Date: Tue, 28 Jul 2026 00:23:56 +0100 Subject: [PATCH] Fixup scoreboard hostname handling Change to how it's handled like in old/sdk scoreboard. Had wrong assumption on using the hostname convar instead of event. --- src/game/client/neo/ui/neo_scoreboard.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/game/client/neo/ui/neo_scoreboard.cpp b/src/game/client/neo/ui/neo_scoreboard.cpp index 8b4fe7498..4946f5147 100644 --- a/src/game/client/neo/ui/neo_scoreboard.cpp +++ b/src/game/client/neo/ui/neo_scoreboard.cpp @@ -192,6 +192,12 @@ void CNEOScoreBoard::FireGameEvent(IGameEvent *event) { m_HLTVSpectators = event->GetInt("clients") - event->GetInt("proxies"); } + else if (0 == V_strcmp(type, "server_spawn")) + { + const char *hostname = event->GetString("hostname"); + g_pVGuiLocalize->ConvertANSIToUnicode(hostname, + m_wszHostname, sizeof(m_wszHostname)); + } if (IsVisible()) { @@ -539,10 +545,7 @@ void CNEOScoreBoard::Update() }, nullptr); // NEO JANK (nullsystem): FireGameEvent is unreliable for fetching - // hostname and current map so just poll it from ConVar/NEORules instead - const ConVarRef cvr_hostname("hostname"); - g_pVGuiLocalize->ConvertANSIToUnicode(cvr_hostname.GetString(), - m_wszHostname, sizeof(m_wszHostname)); + // current map so just poll it from NEORules instead g_pVGuiLocalize->ConvertANSIToUnicode(NEORules()->MapName(), m_wszMap, sizeof(m_wszMap));