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

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.
This commit is contained in:
paramat 2017-04-06 15:58:12 +01:00
parent eb587996e4
commit 59911761ef
2 changed files with 46 additions and 4 deletions

View file

@ -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