SF: Set initial hbuf to 0. Need new concept/discussion.

Setting to something on creation of data is ineffective, because it gets
set to 0 on passable violations.

Keeping the buffer means other abuse potential.

Probably better postpone until re-design/removal of the buffer concept.
This commit is contained in:
asofold 2013-07-23 10:31:46 +02:00
parent a872cc8a86
commit 9e920b89cb
2 changed files with 5 additions and 3 deletions

View File

@ -169,7 +169,7 @@ public class MovingData extends ACheckData {
public double passableVL;
// Data of the survival fly check.
public double sfHorizontalBuffer = SurvivalFly.hBufMax / 2.0;
public double sfHorizontalBuffer = 0.0; // ineffective: SurvivalFly.hBufMax / 2.0;
/** Event-counter to cover up for sprinting resetting server side only. Set in the FighListener. */
public int lostSprintCount = 0;
public int sfJumpPhase = 0;
@ -566,7 +566,7 @@ public class MovingData extends ACheckData {
}
/**
* Get effective amount of all used velocity.
* Get effective amount of all used velocity. Non-destructive.
* @return
*/
public double getHorizontalFreedom() {

View File

@ -182,7 +182,7 @@ public class SurvivalFly extends Check {
final boolean downStream = hDistance > walkSpeed * modSwim && from.isInLiquid() && from.isDownStream(xDistance, zDistance);
// Handle ice.
// TODO: Maybe re-model ice stuff (test out what is really needed, e.g. modifier + reset on ground).
// TODO: Re-model ice stuff and other (e.g. general thing: ground-modifier + reset conditions).
if (from.isOnIce() || to.isOnIce()) {
data.sfOnIce = 20;
}
@ -827,6 +827,8 @@ public class SurvivalFly extends Check {
private double[] hDistAfterFailure(final Player player, final PlayerLocation from, final PlayerLocation to, final double walkSpeed, double hAllowedDistance, final double hDistance, double hDistanceAboveLimit, final double yDistance, final boolean sprinting, final boolean downStream, final MovingData data, final MovingConfig cc, final boolean skipPermChecks) {
// TODO: Still not entirely sure about this checking order.
// TODO: Return on 0 over dist.
// TODO: Bunny hop: check here with simplified pre-conditions, if not matching re-check below.
// After failure permission checks ( + speed modifier + sneaking + blocking + speeding) and velocity (!).
if (!skipPermChecks){