Add LiftOffEnvelope.UNKNOWN as default, to distinguish from web.

This commit is contained in:
asofold 2015-10-26 02:32:36 +01:00
parent 0febcfef66
commit 8adab538c4
3 changed files with 7 additions and 6 deletions

View File

@ -99,7 +99,7 @@ public class MovingData extends ACheckData {
* Default lift-off envelope, used after resetting. <br>
* TODO: Test, might be better ground.
*/
private static final LiftOffEnvelope defaultLiftOffEnvelope = LiftOffEnvelope.NO_JUMP;
private static final LiftOffEnvelope defaultLiftOffEnvelope = LiftOffEnvelope.UNKNOWN;
/** Tolerance value for using vertical velocity (the client sends different values than received with fight damage). */
private static final double TOL_VVEL = 0.0625;
@ -895,7 +895,7 @@ public class MovingData extends ACheckData {
liftOffEnvelope = LiftOffEnvelope.NORMAL;
}
else {
liftOffEnvelope = defaultLiftOffEnvelope;
liftOffEnvelope = LiftOffEnvelope.UNKNOWN;
}
}

View File

@ -403,7 +403,6 @@ public class SurvivalFly extends Check {
// Check lift-off medium.
// TODO: Web before liquid? Climbable?
// TODO: Web might be NO_JUMP !
// TODO: isNextToGround(0.15, 0.4) allows a little much (yMargin), but reduces false positives.
// TODO: nextToGround: Shortcut with block-flags ?
if (to.isInLiquid()) {

View File

@ -12,11 +12,13 @@ public enum LiftOffEnvelope {
/** Weak or no limit moving off liquid near ground. */
LIMIT_NEAR_GROUND(0.42, 1.35, 6, false), // TODO: 0.385 / not jump on top of 1 high wall from water.
/** Simple calm water surface. */
LIMIT_LIQUID(0.1, 0.27, 3, false), // TODO:
LIMIT_LIQUID(0.1, 0.27, 3, false),
// /** Flowing water / strong(-est) limit. */
// LIMIT_LIQUID_STRONG(...), // TODO
/** No jumping at all. */
NO_JUMP(0.0, 0.0, 0, false); // TODO
/** No jumping at all (web). */
NO_JUMP(0.0, 0.0, 0, false),
/** Like NO_JUMP, just to distinguish from being in web. */
UNKNOWN(0.0, 0.0, 0, false);
;
private double maxJumpGain;