Fix nofall dealing fractions of half hearts damage.

This commit is contained in:
asofold 2013-09-08 02:03:45 +02:00
parent 0a748c4290
commit 5d60343104

View File

@ -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);