mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-29 23:17:41 +02:00
Add LiftOffEnvelope.UNKNOWN as default, to distinguish from web.
This commit is contained in:
parent
0febcfef66
commit
8adab538c4
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user