diff options
author | SmallJoker <mk939@ymail.com> | 2017-04-01 20:38:14 +0200 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-05-03 03:16:20 +0100 |
commit | f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0 (patch) | |
tree | 96314426d03fffb6881bfc36bb961d2f6366fbf7 /src/localplayer.h | |
parent | bd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2 (diff) | |
download | minetest-f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0.tar.gz minetest-f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0.tar.bz2 minetest-f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0.zip |
Sneak: Improve and fix various things
Remove useless `got_teleported`.
Fix jitter when walking against the sneak limits.
Fix damage evading on sneak ladders.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/localplayer.h b/src/localplayer.h index d8d2f310b..dcfefcb1a 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -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(); } |