Ben Deutsch fc13c00ef3 Alternative code for slipping (#6256)
* Alternative code for slipping

- does not depend on frame rate
- controllable via environment variables for now

* Adjust slipping speed for item entities too.

* Final version of framerate-independent slippery code

* Remove dead code and fix formatting

* getStandingNodePos should only look 0.05 nodes downwards

This ensures that, even if the player is standing on a partially
filled node, this node is used as the standing node and not the
node below it.

Specific use: enables slippery slabs

* Exchange global getStandingPosNode change for local inline change

Reverts previous commit

* Revert the item movement changes

* Slippery nodes now slip over cliffs and edges

Players no longer suddenly stop before falling off.
Also refactored slippery code into getSlipFactor method.

* Slipping over an edge gated by player's is_slipping state

A new flag for just this case, to reduce costly node lookups in
the normal case of leaning over a non-slippery edge.
Public access for consistency and potential future uses.

* Minor code tweaks / cosmetics

* Add temp variable to improve readability and fix indentation issues
2017-08-26 09:01:09 +02:00
..
2017-08-24 08:28:54 +02:00
2017-08-25 15:53:56 +02:00
2017-08-25 15:53:56 +02:00
2017-08-25 15:53:56 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-24 08:28:54 +02:00
2017-08-24 08:28:54 +02:00
2017-08-24 08:28:54 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-25 15:53:56 +02:00
2017-08-18 07:44:52 +02:00
2017-08-17 22:19:39 +02:00
2017-08-18 07:44:52 +02:00
2017-08-18 07:44:52 +02:00
2017-08-18 07:44:52 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-18 07:44:52 +02:00
2017-08-18 07:44:52 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-18 07:44:52 +02:00
2017-08-18 07:44:52 +02:00
2017-08-18 07:44:52 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 08:28:54 +02:00
2017-08-18 08:07:59 +02:00
2017-08-24 17:54:10 +02:00
2017-08-18 08:07:59 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-18 08:21:01 +02:00
2017-08-24 08:28:54 +02:00
2017-08-19 11:29:46 +02:00
2017-08-19 09:12:54 +02:00
2017-08-19 09:12:54 +02:00
2017-08-19 09:12:54 +02:00
2017-08-19 09:29:55 +02:00
2017-08-19 11:29:46 +02:00
2017-08-17 22:19:39 +02:00
2017-08-19 09:29:55 +02:00
2017-08-19 09:29:55 +02:00
2017-08-17 22:19:39 +02:00
2017-08-19 09:29:55 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00
2017-08-24 17:54:10 +02:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00
2017-01-18 23:21:01 +01:00
2017-08-24 17:54:10 +02:00
2017-08-24 17:54:10 +02:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00