fix onliquid check

clear internal fall damage counter if players get new velocity
assigned
This commit is contained in:
Evenprime 2011-09-25 10:33:42 +02:00
parent 4569546b3a
commit dad338db65
2 changed files with 5 additions and 2 deletions

View File

@ -32,7 +32,7 @@ public class OnLiquidCheck {
boolean cancel = false;
if(blockPlaced == null) {
if(blockPlaced == null || blockPlaced.isEmpty()) {
// all ok
} else if(blockPlacedAgainst != null && isSolid(blockPlacedAgainst)) {
// all ok

View File

@ -109,9 +109,12 @@ public class PlayerMoveEventManager extends PlayerListener implements EventManag
if(newVal >= 0.0D) {
mdata.vertVelocity += newVal;
mdata.vertFreedom += mdata.vertVelocity;
mdata.vertVelocityCounter = 50;
}
mdata.vertVelocityCounter = 50;
mdata.fallDistance = 0.0f; // Don't be too unforgiving with fall damage
newVal = Math.sqrt(Math.pow(v.getX(), 2) + Math.pow(v.getZ(), 2));
if(newVal > 0.0D) {
mdata.horizFreedom += newVal;