1
0

Added CustomName saving.

This commit is contained in:
Howaner
2014-09-02 19:34:58 +02:00
parent 079634d18c
commit 5c53608dd0
3 changed files with 23 additions and 2 deletions

View File

@@ -710,7 +710,10 @@ void cMonster::SetCustomName(const AString & a_CustomName)
m_CustomName = a_CustomName.substr(0, 64);
}
m_World->BroadcastEntityMetadata(*this);
if (m_World != NULL)
{
m_World->BroadcastEntityMetadata(*this);
}
}
@@ -720,7 +723,10 @@ void cMonster::SetCustomName(const AString & a_CustomName)
void cMonster::SetCustomNameAlwaysVisible(bool a_CustomNameAlwaysVisible)
{
m_CustomNameAlwaysVisible = a_CustomNameAlwaysVisible;
m_World->BroadcastEntityMetadata(*this);
if (m_World != NULL)
{
m_World->BroadcastEntityMetadata(*this);
}
}