summaryrefslogtreecommitdiff
path: root/src/server/unit_sao.h
diff options
context:
space:
mode:
authorJordan Snelling <jordach.snelling@gmail.com>2020-10-04 14:10:34 +0100
committerGitHub <noreply@github.com>2020-10-04 15:10:34 +0200
commit3068853e8a58ccc7370a5ce977c08223601c497a (patch)
tree07463fe9e41197a743bac3a4cea5d63c22402297 /src/server/unit_sao.h
parent0f98b54aa4b2361575002d92b29fe222703ba557 (diff)
downloadminetest-3068853e8a58ccc7370a5ce977c08223601c497a.tar.gz
minetest-3068853e8a58ccc7370a5ce977c08223601c497a.tar.bz2
minetest-3068853e8a58ccc7370a5ce977c08223601c497a.zip
Add First Person Attachments (#10360)
Fixes some other third person camera specific attachments. Implements a single new flag for entities to be forced visible in first person mode. Old mods do not need to be updated to use the new flag and are fully backwards compatible.
Diffstat (limited to 'src/server/unit_sao.h')
-rw-r--r--src/server/unit_sao.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/unit_sao.h b/src/server/unit_sao.h
index 3cb7f0ad5..a21e055c5 100644
--- a/src/server/unit_sao.h
+++ b/src/server/unit_sao.h
@@ -64,9 +64,9 @@ public:
ServerActiveObject *getParent() const;
inline bool isAttached() const { return getParent(); }
void setAttachment(int parent_id, const std::string &bone, v3f position,
- v3f rotation);
+ v3f rotation, bool force_visible);
void getAttachment(int *parent_id, std::string *bone, v3f *position,
- v3f *rotation) const;
+ v3f *rotation, bool *force_visible) const;
void clearChildAttachments();
void clearParentAttachment();
void addAttachmentChild(int child_id);
@@ -133,4 +133,5 @@ private:
v3f m_attachment_position;
v3f m_attachment_rotation;
bool m_attachment_sent = false;
+ bool m_force_visible = false;
};