1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Fix invisible player when the attached entity is removed

This commit is contained in:
TeTpaAka 2015-07-03 12:31:34 +02:00 committed by est31
parent 9c76f379ac
commit 8d03301138
4 changed files with 96 additions and 10 deletions

View file

@ -591,6 +591,21 @@ void LuaEntitySAO::getAttachment(int *parent_id, std::string *bone, v3f *positio
*rotation = m_attachment_rotation;
}
void LuaEntitySAO::addAttachmentChild(int child_id)
{
m_attachment_child_ids.insert(child_id);
}
void LuaEntitySAO::removeAttachmentChild(int child_id)
{
m_attachment_child_ids.erase(child_id);
}
std::set<int> LuaEntitySAO::getAttachmentChildIds()
{
return m_attachment_child_ids;
}
ObjectProperties* LuaEntitySAO::accessObjectProperties()
{
return &m_prop;
@ -1231,6 +1246,21 @@ void PlayerSAO::getAttachment(int *parent_id, std::string *bone, v3f *position,
*rotation = m_attachment_rotation;
}
void PlayerSAO::addAttachmentChild(int child_id)
{
m_attachment_child_ids.insert(child_id);
}
void PlayerSAO::removeAttachmentChild(int child_id)
{
m_attachment_child_ids.erase(child_id);
}
std::set<int> PlayerSAO::getAttachmentChildIds()
{
return m_attachment_child_ids;
}
ObjectProperties* PlayerSAO::accessObjectProperties()
{
return &m_prop;