Reduce false positives for jumping off water near half-steps.

This allows a little more jumping in shallow water.
This commit is contained in:
asofold 2013-02-27 22:45:54 +01:00
parent eb28f4775c
commit c8ac66de2c

View File

@ -373,15 +373,22 @@ public class SurvivalFly extends Check {
// Check lift-off medium.
// TODO: Web might be NO_JUMP !
// TODO: isNextToGround(0.15, 0.4) allows a little much (yMargin), but reduces false positives.
if (to.isInLiquid() || to.isInWeb()){
data.mediumLiftOff = MediumLiftOff.LIMIT_JUMP;
if (to.isInLiquid() && to.isNextToGround(0.15, 0.4)){
// Consent with ground.
data.mediumLiftOff = MediumLiftOff.GROUND;
}
else{
data.mediumLiftOff = MediumLiftOff.LIMIT_JUMP;
}
}
else if (resetTo){
// TODO: This might allow jumping on vines etc., but should do for the moment.
data.mediumLiftOff = MediumLiftOff.GROUND;
}
else if (from.isInLiquid()){
if (to.isNextToGround(0.15, 0.001)){
if (to.isNextToGround(0.15, 0.4)){
data.mediumLiftOff = MediumLiftOff.GROUND;
}
else{