mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 01:45:36 +02:00
Refactor player's eye position coding
Collect the player's eye position coding in a Player method, and use it in client to pass the eye position information to the game.
This commit is contained in:
@@ -67,6 +67,14 @@ public:
|
||||
return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
|
||||
}
|
||||
|
||||
v3f getEyePosition()
|
||||
{
|
||||
// This is at the height of the eyes of the current figure
|
||||
// return m_position + v3f(0, BS+BS/2, 0);
|
||||
// This is more like in minecraft
|
||||
return m_position + v3f(0,BS+(5*BS)/8,0);
|
||||
}
|
||||
|
||||
virtual void setPosition(const v3f &position)
|
||||
{
|
||||
m_position = position;
|
||||
|
Reference in New Issue
Block a user