Remove Spectate label from HUD, show Following {player} instead

This commit is contained in:
Robert Müller 2024-06-18 21:45:52 +02:00
parent 7ee7ec6434
commit 908ebc65ee

View file

@ -1384,7 +1384,18 @@ void CHud::RenderSpectatorHud()
// draw the text
char aBuf[128];
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Spectate"), GameClient()->m_MultiViewActivated ? Localize("Multi-View") : m_pClient->m_Snap.m_SpecInfo.m_SpectatorId != SPEC_FREEVIEW ? m_pClient->m_aClients[m_pClient->m_Snap.m_SpecInfo.m_SpectatorId].m_aName : Localize("Free-View"));
if(GameClient()->m_MultiViewActivated)
{
str_copy(aBuf, Localize("Multi-View"));
}
else if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorId != SPEC_FREEVIEW)
{
str_format(aBuf, sizeof(aBuf), Localize("Following %s", "Spectating"), m_pClient->m_aClients[m_pClient->m_Snap.m_SpecInfo.m_SpectatorId].m_aName);
}
else
{
str_copy(aBuf, Localize("Free-View"));
}
TextRender()->Text(m_Width - 174.0f, m_Height - 15.0f + (15.f - 8.f) / 2.f, 8.0f, aBuf, -1.0f);
}