1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Player eye height: Make this a settable player object property

This commit is contained in:
paramat 2017-11-03 19:10:53 +00:00 committed by paramat
parent a07d2594e3
commit 4c40e0775c
7 changed files with 15 additions and 4 deletions

View file

@ -138,6 +138,7 @@ public:
v3f getPosition() const { return m_position; }
v3f getEyePosition() const { return m_position + getEyeOffset(); }
v3f getEyeOffset() const;
void setEyeHeight(float eye_height) { m_eye_height = eye_height; }
void setCollisionbox(const aabb3f &box) { m_collisionbox = box; }
@ -181,6 +182,7 @@ private:
aabb3f m_collisionbox = aabb3f(-BS * 0.30f, 0.0f, -BS * 0.30f, BS * 0.30f,
BS * 1.75f, BS * 0.30f);
bool m_can_zoom = true;
float m_eye_height = 1.625f;
GenericCAO *m_cao = nullptr;
Client *m_client;