mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Merge branch 'DDRace64' of https://github.com/def-/ddnet into DDRace64
This commit is contained in:
commit
249988fa85
|
@ -27,6 +27,7 @@ void CKillMessages::OnMessage(int MsgType, void *pRawMsg)
|
|||
CKillMsg Kill;
|
||||
Kill.m_VictimID = pMsg->m_Victim;
|
||||
Kill.m_VictimTeam = m_pClient->m_aClients[Kill.m_VictimID].m_Team;
|
||||
Kill.m_VictimDDTeam = m_pClient->m_Teams.Team(Kill.m_VictimID);
|
||||
str_copy(Kill.m_aVictimName, m_pClient->m_aClients[Kill.m_VictimID].m_aName, sizeof(Kill.m_aVictimName));
|
||||
Kill.m_VictimRenderInfo = m_pClient->m_aClients[Kill.m_VictimID].m_RenderInfo;
|
||||
Kill.m_KillerID = pMsg->m_Killer;
|
||||
|
@ -69,7 +70,13 @@ void CKillMessages::OnRender()
|
|||
|
||||
// render victim name
|
||||
x -= VictimNameW;
|
||||
if(m_aKillmsgs[r].m_VictimID >= 0 && g_Config.m_ClChatTeamColors && m_aKillmsgs[r].m_VictimDDTeam)
|
||||
{
|
||||
vec3 rgb = HslToRgb(vec3(m_aKillmsgs[r].m_VictimDDTeam / 64.0f, 1.0f, 0.75f));
|
||||
TextRender()->TextColor(rgb.r, rgb.g, rgb.b, 1.0);
|
||||
}
|
||||
TextRender()->Text(0, x, y, FontSize, m_aKillmsgs[r].m_aVictimName, -1);
|
||||
TextRender()->TextColor(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
// render victim tee
|
||||
x -= 24.0f;
|
||||
|
|
|
@ -13,6 +13,7 @@ public:
|
|||
int m_Weapon;
|
||||
int m_VictimID;
|
||||
int m_VictimTeam;
|
||||
int m_VictimDDTeam;
|
||||
char m_aVictimName[64];
|
||||
CTeeRenderInfo m_VictimRenderInfo;
|
||||
int m_KillerID;
|
||||
|
|
Loading…
Reference in a new issue