1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Sneak: Improve and fix various things

Remove useless `got_teleported`.
Fix jitter when walking against the sneak limits.
Fix damage evading on sneak ladders.
This commit is contained in:
SmallJoker 2017-04-01 20:38:14 +02:00 committed by paramat
parent bd921a7916
commit f9fdb48dc8
6 changed files with 36 additions and 32 deletions

View file

@ -47,7 +47,6 @@ public:
ClientActiveObject *parent;
u16 hp;
bool got_teleported;
bool isAttached;
bool touching_ground;
// This oscillates so that the player jumps a bit above the surface
@ -126,7 +125,11 @@ public:
f32 getPitch() const { return m_pitch; }
void setPosition(const v3f &position) { m_position = position; }
inline void setPosition(const v3f &position)
{
m_position = position;
m_sneak_node_exists = false;
}
v3f getPosition() const { return m_position; }
v3f getEyePosition() const { return m_position + getEyeOffset(); }