Fix aspect of NoFall.

1. Add used PlayerLocation back to parked.
2. Also check for ladder and stairs.
This commit is contained in:
asofold 2012-12-06 02:11:38 +01:00
parent da942816f1
commit 6e62b7ee1b

View File

@ -792,8 +792,9 @@ public class MovingListener extends CheckListener{
else moveInfo = parkedInfo.remove(parkedInfo.size() - 1);
moveInfo.set(player, loc, null, cc.noFallyOnGround);
// NOTE: No isIllegal check here.
final PlayerLocation pLoc = moveInfo.from;
moveInfo.from.collectBlockFlags(cc.noFallyOnGround);
if (!moveInfo.from.isOnGround() && !moveInfo.from.isResetCond()){
if (!pLoc.isOnGround() && !pLoc.isResetCond() && !pLoc.isAboveLadder() && !pLoc.isAboveStairs()){
// Likely a new style no-fall bypass (damage in mid-air).
data.noFallVL += 1.0;
if (noFall.executeActions(player, data.noFallVL, 1.0, cc.noFallActions, true) && data.setBack != null){
@ -803,6 +804,7 @@ public class MovingListener extends CheckListener{
}
}
moveInfo.cleanup();
parkedInfo.add(moveInfo);
}
final float fallDistance = player.getFallDistance();
final int damage = event.getDamage();