mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-14 14:25:32 +01:00
NoFall: Account for just moved distance for moving onto ground.
This commit is contained in:
parent
0dec258753
commit
660182f351
@ -128,6 +128,7 @@ public class NoFall extends Check {
|
|||||||
}
|
}
|
||||||
else if (toOnGround){
|
else if (toOnGround){
|
||||||
// Check if to deal damage.
|
// Check if to deal damage.
|
||||||
|
if (yDiff < 0) data.noFallFallDistance -= yDiff;
|
||||||
if (cc.noFallDealDamage) handleOnGround(mcPlayer, data, to.getY(), cc);
|
if (cc.noFallDealDamage) handleOnGround(mcPlayer, data, to.getY(), cc);
|
||||||
else{
|
else{
|
||||||
mcPlayer.fallDistance = Math.max(mcPlayer.fallDistance, Math.max(data.noFallFallDistance, (float) (data.noFallMaxY - to.getY())));
|
mcPlayer.fallDistance = Math.max(mcPlayer.fallDistance, Math.max(data.noFallFallDistance, (float) (data.noFallMaxY - to.getY())));
|
||||||
|
Loading…
Reference in New Issue
Block a user