Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/game/client/neo/ui/neo_scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down Expand Up @@ -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));

Expand Down