From b8c5303b05ad45281699b0fa1808a3fc43c48ba7 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Mon, 2 Aug 2021 11:58:05 +0100 Subject: [PATCH] Always use our cached name value (#1544) In #545 we started automatically fixing up invalid UTF8 characters caused by truncated names from Steam, but since the dawn of time CPlayer has preferred directly returning the engine's name pointer if we have once available, so our corrected name is almost never used. Lightly tested in CS:GO and TF2 with no ill effects. Fixes #1315 --- core/PlayerManager.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 3be4808bc..b3bec2017 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -2282,11 +2282,6 @@ void CPlayer::SetName(const char *name) const char *CPlayer::GetName() { - if (m_Info && m_pEdict->GetUnknown()) - { - return m_Info->GetName(); - } - return m_Name.c_str(); }