1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

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.
This commit is contained in:
Jordan Snelling 2020-10-04 14:10:34 +01:00 committed by GitHub
parent 0f98b54aa4
commit 3068853e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 101 additions and 35 deletions

View file

@ -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;
};