mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user