From b33ce0f37d27dd9e59cd4545f04c111b27ad402c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 18 May 2023 22:39:55 +0200 Subject: [PATCH] Change friend info text to `Map | Mode | Country/Ping` --- src/game/client/components/menus_browser.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 2767397ba..2ef5f4815 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -1462,10 +1462,12 @@ void CMenus::RenderServerbrowserFriends(CUIRect View) // info if(Friend.ServerInfo()) { - if(Friend.IsPlayer()) - str_format(aBuf, sizeof(aBuf), Localize("Playing '%s' on '%s'", "Playing '(gametype)' on '(map)'"), Friend.ServerInfo()->m_aGameType, Friend.ServerInfo()->m_aMap); + char aLatency[16]; + FormatServerbrowserPing(aLatency, sizeof(aLatency), Friend.ServerInfo()); + if(aLatency[0] != '\0') + str_format(aBuf, sizeof(aBuf), "%s | %s | %s", Friend.ServerInfo()->m_aMap, Friend.ServerInfo()->m_aGameType, aLatency); else - str_format(aBuf, sizeof(aBuf), Localize("Spectating '%s' on '%s'", "Spectating '(gametype)' on '(map)'"), Friend.ServerInfo()->m_aGameType, Friend.ServerInfo()->m_aMap); + str_format(aBuf, sizeof(aBuf), "%s | %s", Friend.ServerInfo()->m_aMap, Friend.ServerInfo()->m_aGameType); UI()->DoLabel(&InfoLabel, aBuf, FontSize - 2.0f, TEXTALIGN_ML); }