summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2017-04-06 15:58:12 +0100
committerparamat <mat.gregory@virginmedia.com>2017-04-11 05:41:13 +0100
commit59911761ef529f118e7ba697d4f5983d43dbb383 (patch)
tree405f23520008a8702d162db43f4b3fc58b31e171 /src/localplayer.h
parenteb587996e42544ec8624b256e6d5eea12f9bab88 (diff)
downloadminetest-59911761ef529f118e7ba697d4f5983d43dbb383.tar.gz
minetest-59911761ef529f118e7ba697d4f5983d43dbb383.tar.bz2
minetest-59911761ef529f118e7ba697d4f5983d43dbb383.zip
Sneak glitch: Detect ledge for 2-node climb-up
Re-creates the old sneak-jump behaviour in new code. Enabled by the 'sneak glitch' physics override. When a ledge is detected the jump speed modifier is set to the larger of 'physics override jump' and 1.3 to allow a 2-node climb-up. An unexpected side-effect is the simple sneak ladder working smoothly.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index cac371cf1..ae987b893 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -146,6 +146,9 @@ private:
// 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;
+ // Whether a 2-node-up ledge is detected at the players pos,
+ // see detectLedge() in the .cpp for more info (always false if disabled).
+ bool m_ledge_detected;
// Node below player, used to determine whether it has been removed,
// and its old type