summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorTeTpaAka <TeTpaAka@users.noreply.github.com>2015-07-03 12:31:34 +0200
committerest31 <MTest31@outlook.com>2015-07-18 07:41:43 +0200
commit8d03301138c0e82728d61b957ea47a5a4061633a (patch)
treebafa658a24d90ec5381f3a21e93803dc0165a1b5 /src/content_sao.cpp
parent9c76f379acb12246fb1e282661e67b9da4cdcb62 (diff)
downloadminetest-8d03301138c0e82728d61b957ea47a5a4061633a.tar.gz
minetest-8d03301138c0e82728d61b957ea47a5a4061633a.tar.bz2
minetest-8d03301138c0e82728d61b957ea47a5a4061633a.zip
Fix invisible player when the attached entity is removed
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 386b7e070..eab1e6279 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -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;