Allow normal gravity slope after having been on ground.

This commit is contained in:
asofold 2015-10-03 00:23:47 +02:00
parent 7bcae640e9
commit ee2df3f05b

View File

@ -1068,6 +1068,9 @@ public class SurvivalFly extends Check {
&& yDistance < GRAVITY_ODD && yDistance > -2.0 * GRAVITY_MAX - GRAVITY_ODD / 2.0
// Head is obstructed. TODO: Cover this in a more generic way elsewhere (<= friction envelope + obstructed).
|| data.lastYDist >= 0.0 && (from.isHeadObstructed(from.getyOnGround()) || data.fromWasReset && from.isHeadObstructed())
// Break the block underneath.
|| data.lastYDist < 0.0 && data.toWasReset // TODO: Also assumeGround? Should have more precise flags.
&& yDistance >= -GRAVITY_MAX - GRAVITY_SPAN && yDistance <= GRAVITY_MIN
)
// Jump-effect-specific
|| data.jumpAmplifier > 0 && data.lastYDist < GRAVITY_MAX + GRAVITY_MIN / 2.0 && data.lastYDist > -2.0 * GRAVITY_MAX