Attempt to fix survivalfly false positives on login in water (seldom).

This commit is contained in:
asofold 2013-01-30 03:06:30 +01:00
parent d2cdf377eb
commit 04b1341e43
2 changed files with 7 additions and 2 deletions

View File

@ -1028,6 +1028,10 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
// TODO: on existing set back: detect world changes and loss of world on join (+ set up some paradigm).
data.clearMorePacketsData();
final Location loc = player.getLocation();
// TODO: shouldCheckSurvivalFly ?
// Correct set-back on world changes.
if (!data.hasSetBack() || data.hasSetBackWorldChanged(loc)){
data.setSetBack(loc);
}
@ -1035,8 +1039,9 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
// TODO: re-think: more fine grained reset?
data.resetPositions(loc);
}
final MovingConfig cc = MovingConfig.getConfig(player);
// Reset hover ticks until a better method is used.
if (MovingConfig.getConfig(player).sfHoverCheck){
if (cc.sfHoverCheck){
// Start as if hovering already.
data.sfHoverTicks = 0;
hoverTicks.add(player.getName());

View File

@ -42,7 +42,7 @@ public class SurvivalFly extends Check {
public static final double sprintingSpeed = 0.35D;
public static final double blockingSpeed = 0.16D;
public static final double swimmingSpeed = 0.11D;
public static final double swimmingSpeed = 0.115D;
public static final double webSpeed = 0.105D; // TODO: walkingSpeed * 0.15D; <- does not work
// public static final double climbSpeed = sprintingSpeed; // TODO.