mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-03 00:47:25 +02:00
Allow normal gravity slope after having been on ground.
This commit is contained in:
parent
7bcae640e9
commit
ee2df3f05b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user