diff options
author | sfan5 <sfan5@live.de> | 2017-03-23 21:47:59 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-03-26 05:53:30 +0100 |
commit | 1139a18c3a28b99de481f3187f88981be4492ead (patch) | |
tree | 1d18cda901b7ad41c18d197bd3263b5323c8e3e5 /src/localplayer.h | |
parent | e70e15134c95d37241bb6f6124105c0f1c08ab8a (diff) | |
download | minetest-1139a18c3a28b99de481f3187f88981be4492ead.tar.gz minetest-1139a18c3a28b99de481f3187f88981be4492ead.tar.bz2 minetest-1139a18c3a28b99de481f3187f88981be4492ead.zip |
Sneak: Replicate sneak ladder in new code, is optional
Enabled using the existing 'sneak_glitch' physics override.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/localplayer.h b/src/localplayer.h index 1da0f3a5b..cac371cf1 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -135,15 +135,18 @@ private: void accelerateVertical(const v3f &target_speed, const f32 max_increase); v3f m_position; - // This is used for determining the sneaking range + v3s16 m_sneak_node; + // Stores the top bounding box of m_sneak_node + aabb3f m_sneak_node_bb_top; // Whether the player is allowed to sneak bool m_sneak_node_exists; - // Whether recalculation of the sneak node is needed + // Whether recalculation of m_sneak_node and its top bbox is needed bool m_need_to_get_new_sneak_node; - // Stores the top bounding box of m_sneak_node and is updated - // when m_need_to_get_new_sneak_node == true - aabb3f m_sneak_node_bb_top; + // Whether a "sneak ladder" structure is detected at the players pos + // see detectSneakLadder() in the .cpp for more info (always false if disabled) + bool m_sneak_ladder_detected; + // Node below player, used to determine whether it has been removed, // and its old type v3s16 m_old_node_below; |