Fix variable name m_VictimTextWidth

This commit is contained in:
Robert Müller 2023-04-27 20:46:58 +02:00
parent be68c5ad7a
commit 5cb9902745
2 changed files with 5 additions and 5 deletions

View file

@ -66,7 +66,7 @@ void CKillMessages::CreateKillmessageNamesIfNotCreated(CKillMsg &Kill)
const float FontSize = 36.0f; const float FontSize = 36.0f;
if(Kill.m_VictimTextContainerIndex == -1 && Kill.m_aVictimName[0] != 0) if(Kill.m_VictimTextContainerIndex == -1 && Kill.m_aVictimName[0] != 0)
{ {
Kill.m_VitctimTextWidth = TextRender()->TextWidth(FontSize, Kill.m_aVictimName, -1, -1.0f); Kill.m_VictimTextWidth = TextRender()->TextWidth(FontSize, Kill.m_aVictimName, -1, -1.0f);
CTextCursor Cursor; CTextCursor Cursor;
TextRender()->SetCursor(&Cursor, 0, 0, FontSize, TEXTFLAG_RENDER); TextRender()->SetCursor(&Cursor, 0, 0, FontSize, TEXTFLAG_RENDER);
@ -150,7 +150,7 @@ void CKillMessages::OnMessage(int MsgType, void *pRawMsg)
Kill.m_ModeSpecial = 0; Kill.m_ModeSpecial = 0;
Kill.m_Tick = Client()->GameTick(g_Config.m_ClDummy); Kill.m_Tick = Client()->GameTick(g_Config.m_ClDummy);
Kill.m_VitctimTextWidth = Kill.m_KillerTextWidth = 0.f; Kill.m_VictimTextWidth = Kill.m_KillerTextWidth = 0.f;
float Width = 400 * 3.0f * Graphics()->ScreenAspect(); float Width = 400 * 3.0f * Graphics()->ScreenAspect();
float Height = 400 * 3.0f; float Height = 400 * 3.0f;
@ -217,7 +217,7 @@ void CKillMessages::OnMessage(int MsgType, void *pRawMsg)
Kill.m_FlagCarrierBlue = m_pClient->m_Snap.m_pGameDataObj ? m_pClient->m_Snap.m_pGameDataObj->m_FlagCarrierBlue : -1; Kill.m_FlagCarrierBlue = m_pClient->m_Snap.m_pGameDataObj ? m_pClient->m_Snap.m_pGameDataObj->m_FlagCarrierBlue : -1;
Kill.m_VitctimTextWidth = Kill.m_KillerTextWidth = 0.f; Kill.m_VictimTextWidth = Kill.m_KillerTextWidth = 0.f;
float Width = 400 * 3.0f * Graphics()->ScreenAspect(); float Width = 400 * 3.0f * Graphics()->ScreenAspect();
float Height = 400 * 3.0f; float Height = 400 * 3.0f;
@ -272,7 +272,7 @@ void CKillMessages::OnRender()
ColorRGBA TOutlineColor(0.f, 0.f, 0.f, 0.3f); ColorRGBA TOutlineColor(0.f, 0.f, 0.f, 0.3f);
// render victim name // render victim name
x -= m_aKillmsgs[r].m_VitctimTextWidth; x -= m_aKillmsgs[r].m_VictimTextWidth;
if(m_aKillmsgs[r].m_VictimID >= 0 && g_Config.m_ClChatTeamColors && m_aKillmsgs[r].m_VictimDDTeam) if(m_aKillmsgs[r].m_VictimID >= 0 && g_Config.m_ClChatTeamColors && m_aKillmsgs[r].m_VictimDDTeam)
{ {
TColor = color_cast<ColorRGBA>(ColorHSLA(m_aKillmsgs[r].m_VictimDDTeam / 64.0f, 1.0f, 0.75f)); TColor = color_cast<ColorRGBA>(ColorHSLA(m_aKillmsgs[r].m_VictimDDTeam / 64.0f, 1.0f, 0.75f));

View file

@ -30,7 +30,7 @@ public:
int m_VictimDDTeam; int m_VictimDDTeam;
char m_aVictimName[64]; char m_aVictimName[64];
int m_VictimTextContainerIndex; int m_VictimTextContainerIndex;
float m_VitctimTextWidth; float m_VictimTextWidth;
CTeeRenderInfo m_VictimRenderInfo[MAX_KILLMSG_TEAM_MEMBERS]; CTeeRenderInfo m_VictimRenderInfo[MAX_KILLMSG_TEAM_MEMBERS];
int m_KillerID; int m_KillerID;
int m_KillerTeam; int m_KillerTeam;