mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Player eye height: Make this a settable player object property
This commit is contained in:
parent
a07d2594e3
commit
4c40e0775c
7 changed files with 15 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue