summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
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/content_sao.cpp
parenta07d2594e3b9372cabbeedc98bb98903137f56b3 (diff)
downloadminetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.tar.gz
minetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.tar.bz2
minetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.zip
Player eye height: Make this a settable player object property
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 819c63ac3..31ee21e58 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -809,6 +809,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, session_t p
m_prop.colors.clear();
m_prop.colors.emplace_back(255, 255, 255, 255);
m_prop.spritediv = v2s16(1,1);
+ m_prop.eye_height = 1.625f;
// end of default appearance
m_prop.is_visible = true;
m_prop.makes_footstep_sound = true;
@@ -834,7 +835,7 @@ void PlayerSAO::finalize(RemotePlayer *player, const std::set<std::string> &priv
v3f PlayerSAO::getEyeOffset() const
{
- return v3f(0, BS * 1.625f, 0);
+ return v3f(0, BS * m_prop.eye_height, 0);
}
std::string PlayerSAO::getDescription()