mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +01:00
Attempt to fix fall-damage issue with dealdamage=false (Ticket 548).
This commit is contained in:
parent
18e18fae5f
commit
90f110146f
@ -65,8 +65,13 @@ public class NoFall extends Check {
|
||||
}
|
||||
|
||||
private final void adjustFallDistance(final Player player, final double minY, final boolean reallyOnGround, final MovingData data, final MovingConfig cc) {
|
||||
// TODO: Only set for big differences.
|
||||
player.setFallDistance(Math.max(player.getFallDistance(), Math.max(data.noFallFallDistance, (float) (data.noFallMaxY - minY))));
|
||||
final float noFallFallDistance = Math.max(data.noFallFallDistance, (float) (data.noFallMaxY - minY));
|
||||
if (noFallFallDistance >= 3.0){
|
||||
final float fallDistance = player.getFallDistance();
|
||||
if (noFallFallDistance - fallDistance >= 0.5f || noFallFallDistance >= 3.5f && noFallFallDistance < 3.5f){
|
||||
player.setFallDistance(noFallFallDistance);
|
||||
}
|
||||
}
|
||||
data.clearNoFallData();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user