mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +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:
parent
0f98b54aa4
commit
3068853e8a
12 changed files with 101 additions and 35 deletions
|
@ -124,6 +124,7 @@ private:
|
|||
float m_step_distance_counter = 0.0f;
|
||||
u8 m_last_light = 255;
|
||||
bool m_is_visible = false;
|
||||
bool m_force_visible = false;
|
||||
s8 m_glow = 0;
|
||||
// Material
|
||||
video::E_MATERIAL_TYPE m_material_type;
|
||||
|
@ -215,6 +216,11 @@ public:
|
|||
m_is_visible = toset;
|
||||
}
|
||||
|
||||
inline bool isForcedVisible() const
|
||||
{
|
||||
return m_force_visible;
|
||||
}
|
||||
|
||||
void setChildrenVisible(bool toset);
|
||||
void setAttachment(int parent_id, const std::string &bone, v3f position, v3f rotation);
|
||||
void getAttachment(int *parent_id, std::string *bone, v3f *position,
|
||||
|
@ -275,4 +281,6 @@ public:
|
|||
{
|
||||
return m_prop.infotext;
|
||||
}
|
||||
|
||||
void updateMeshCulling();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue