aboutsummaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-11-03 19:10:53 +0000
committerparamat <mat.gregory@virginmedia.com>2017-11-06 12:54:00 +0000
commit4c40e0775ca564296a56f72ff3adce50ba925b0c (patch)
tree204f8f52953502ef56fff2f25c4d8f976524a6c8 /src/localplayer.h
parenta07d2594e3b9372cabbeedc98bb98903137f56b3 (diff)
downloadminetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.tar.xz
Player eye height: Make this a settable player object property
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index a3c97db5d..8e4378dfa 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -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;