mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Fix invisible player when the attached entity is removed
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user