SF: Clear buffer on resetFlyData, carefully reduce with onSetBack.

This commit is contained in:
asofold 2012-11-08 10:10:25 +01:00
parent 24c78d4cd6
commit 2a364b8cb3

View File

@ -143,22 +143,22 @@ public class MovingData extends ACheckData {
public Location setBack; public Location setBack;
public Location teleported; public Location teleported;
/** /**
* Clear the data of the fly checks (not more-packets). * Clear the data of the fly checks (not more-packets).
*/ */
public void clearFlyData() { public void clearFlyData() {
bunnyhopDelay = 0; bunnyhopDelay = 0;
sfJumpPhase = 0; sfJumpPhase = 0;
jumpAmplifier = 0; jumpAmplifier = 0;
setBack = null; setBack = null;
sfLastYDist = Double.MAX_VALUE; sfLastYDist = Double.MAX_VALUE;
fromX = toX = Double.MAX_VALUE; fromX = toX = Double.MAX_VALUE;
clearAccounting(); clearAccounting();
clearNoFallData(); clearNoFallData();
// TODO: Check if to clear buffers etc sfHorizontalBuffer = 0;
} }
/** /**
* Mildly reset the flying data without losing any important information. * Mildly reset the flying data without losing any important information.
* *
@ -176,6 +176,7 @@ public class MovingData extends ACheckData {
// Keep jump amplifier // Keep jump amplifier
// Keep bunny-hop delay (?) // Keep bunny-hop delay (?)
// keep jump phase. // keep jump phase.
sfHorizontalBuffer = Math.min(0, sfHorizontalBuffer);
} }
public void clearAccounting() { public void clearAccounting() {