From 123fd8bff378dd0c6bce0d055407bf8190938067 Mon Sep 17 00:00:00 2001 From: RektInator Date: Wed, 31 May 2017 19:14:58 +0200 Subject: [PATCH] [Clantags] Also apply clantags on overhead names. --- src/Components/Modules/Clantags.hpp | 2 +- src/Components/Modules/Colors.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Modules/Clantags.hpp b/src/Components/Modules/Clantags.hpp index f2a05d72..ae46e8d2 100644 --- a/src/Components/Modules/Clantags.hpp +++ b/src/Components/Modules/Clantags.hpp @@ -7,6 +7,7 @@ namespace Components public: static void ParseClantags(const char * infoString); static void SendClantagsToClients(); + static const char* GetUserClantag(std::uint32_t clientnum, const char * playername); Clantags(); ~Clantags(); @@ -14,7 +15,6 @@ namespace Components private: static std::string Clantags::Tags[18]; - static const char* GetUserClantag(std::uint32_t clientnum, const char * playername); static void DrawPlayerNameOnScoreboard(); }; diff --git a/src/Components/Modules/Colors.cpp b/src/Components/Modules/Colors.cpp index 01950ce9..b549c198 100644 --- a/src/Components/Modules/Colors.cpp +++ b/src/Components/Modules/Colors.cpp @@ -108,8 +108,8 @@ namespace Components { Game::CL_GetClientName(localClientNum, index, buf, size); - // Remove the colors - strncpy_s(buf, size, Colors::Strip(buf).data(), size); + // Append clantag to username & remove the colors + strncpy_s(buf, size, Colors::Strip(Clantags::GetUserClantag(index, buf)).data(), size); return buf; }