From 3afdc20df257407dfcac1258b0786b6b35eb8f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Wed, 26 Jun 2024 20:05:20 +0200 Subject: [PATCH] Rename clan related variables, removing `Name` from name --- src/game/client/components/nameplates.cpp | 14 +++++++------- src/game/client/components/nameplates.h | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/game/client/components/nameplates.cpp b/src/game/client/components/nameplates.cpp index 0813bb3b4..e6cfec9c2 100644 --- a/src/game/client/components/nameplates.cpp +++ b/src/game/client/components/nameplates.cpp @@ -107,10 +107,10 @@ void CNamePlates::RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlay if(g_Config.m_ClNameplatesClan) { - if(str_comp(ClientData.m_aClan, NamePlate.m_aClanName) != 0 || FontSizeClan != NamePlate.m_ClanNameTextFontSize) + if(str_comp(ClientData.m_aClan, NamePlate.m_aClan) != 0 || FontSizeClan != NamePlate.m_ClanTextFontSize) { - str_copy(NamePlate.m_aClanName, ClientData.m_aClan); - NamePlate.m_ClanNameTextFontSize = FontSizeClan; + str_copy(NamePlate.m_aClan, ClientData.m_aClan); + NamePlate.m_ClanTextFontSize = FontSizeClan; CTextCursor Cursor; TextRender()->SetCursor(&Cursor, 0, 0, FontSizeClan, TEXTFLAG_RENDER); @@ -119,7 +119,7 @@ void CNamePlates::RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlay float ScreenX0, ScreenY0, ScreenX1, ScreenY1; Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1); RenderTools()->MapScreenToInterface(m_pClient->m_Camera.m_Center.x, m_pClient->m_Camera.m_Center.y); - TextRender()->RecreateTextContainer(NamePlate.m_ClanNameTextContainerIndex, &Cursor, ClientData.m_aClan); + TextRender()->RecreateTextContainer(NamePlate.m_ClanTextContainerIndex, &Cursor, ClientData.m_aClan); Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1); } } @@ -166,8 +166,8 @@ void CNamePlates::RenderNameplate(vec2 Position, const CNetObj_PlayerInfo *pPlay if(g_Config.m_ClNameplatesClan) { YOffset -= FontSizeClan; - if(NamePlate.m_ClanNameTextContainerIndex.Valid()) - TextRender()->RenderTextContainer(NamePlate.m_ClanNameTextContainerIndex, TColor, TOutlineColor, Position.x - TextRender()->GetBoundingBoxTextContainer(NamePlate.m_ClanNameTextContainerIndex).m_W / 2.0f, YOffset); + if(NamePlate.m_ClanTextContainerIndex.Valid()) + TextRender()->RenderTextContainer(NamePlate.m_ClanTextContainerIndex, TColor, TOutlineColor, Position.x - TextRender()->GetBoundingBoxTextContainer(NamePlate.m_ClanTextContainerIndex).m_W / 2.0f, YOffset); } if(g_Config.m_ClNameplatesFriendMark && ClientData.m_Friend) @@ -330,7 +330,7 @@ void CNamePlates::ResetNamePlates() for(auto &NamePlate : m_aNamePlates) { TextRender()->DeleteTextContainer(NamePlate.m_NameTextContainerIndex); - TextRender()->DeleteTextContainer(NamePlate.m_ClanNameTextContainerIndex); + TextRender()->DeleteTextContainer(NamePlate.m_ClanTextContainerIndex); NamePlate.Reset(); } diff --git a/src/game/client/components/nameplates.h b/src/game/client/components/nameplates.h index ec70944bb..7148dd7d5 100644 --- a/src/game/client/components/nameplates.h +++ b/src/game/client/components/nameplates.h @@ -22,19 +22,19 @@ struct SPlayerNamePlate void Reset() { m_NameTextContainerIndex.Reset(); - m_ClanNameTextContainerIndex.Reset(); + m_ClanTextContainerIndex.Reset(); m_aName[0] = '\0'; - m_aClanName[0] = '\0'; - m_NameTextFontSize = m_ClanNameTextFontSize = 0; + m_aClan[0] = '\0'; + m_NameTextFontSize = m_ClanTextFontSize = 0.0f; } char m_aName[MAX_NAME_LENGTH]; STextContainerIndex m_NameTextContainerIndex; float m_NameTextFontSize; - char m_aClanName[MAX_CLAN_LENGTH]; - STextContainerIndex m_ClanNameTextContainerIndex; - float m_ClanNameTextFontSize; + char m_aClan[MAX_CLAN_LENGTH]; + STextContainerIndex m_ClanTextContainerIndex; + float m_ClanTextFontSize; }; class CNamePlates : public CComponent