mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-04 13:51:24 +01:00
Fix nofall dealing fractions of half hearts damage.
This commit is contained in:
parent
0a748c4290
commit
5d60343104
@ -54,7 +54,7 @@ public class NoFall extends Check {
|
||||
// final int yD = getDamage((float) (data.noFallMaxY - y));
|
||||
// final int maxD = Math.max(Math.max(pD, nfD), yD);
|
||||
final double maxD = getDamage(Math.max((float) (data.noFallMaxY - y), Math.max(data.noFallFallDistance, player.getFallDistance())));
|
||||
if (maxD > 0){
|
||||
if (maxD >= 1.0){
|
||||
// Damage to be dealt.
|
||||
// TODO: more effects like sounds, maybe use custom event with violation added.
|
||||
if (cc.debug) System.out.println(player.getName() + " NoFall deal damage" + (reallyOnGround ? "" : "violation") + ": " + maxD);
|
||||
|
Loading…
Reference in New Issue
Block a user