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:
parent
3c79701208
commit
b8c5303b05
@ -2282,11 +2282,6 @@ void CPlayer::SetName(const char *name)
|
|||||||
|
|
||||||
const char *CPlayer::GetName()
|
const char *CPlayer::GetName()
|
||||||
{
|
{
|
||||||
if (m_Info && m_pEdict->GetUnknown())
|
|
||||||
{
|
|
||||||
return m_Info->GetName();
|
|
||||||
}
|
|
||||||
|
|
||||||
return m_Name.c_str();
|
return m_Name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user