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
This commit is contained in:
Asher Baker 2021-08-02 11:58:05 +01:00 committed by GitHub
parent 3c79701208
commit b8c5303b05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}