Comment out remainders of horizontal accounting.

This commit is contained in:
asofold 2013-01-05 12:25:40 +01:00
parent 81866fcc3e
commit 92adc71ccd
2 changed files with 18 additions and 5 deletions

View File

@ -134,9 +134,9 @@ public class MovingData extends ACheckData {
// Accounting info. // Accounting info.
// TODO: optimize later. // TODO: optimize later.
public final ActionFrequency hDistSum = new ActionFrequency(3, 333); // public final ActionFrequency hDistSum = new ActionFrequency(3, 333);
public final ActionFrequency vDistSum = new ActionFrequency(3, 333); public final ActionFrequency vDistSum = new ActionFrequency(3, 333);
public final ActionFrequency hDistCount = new ActionFrequency(3, 333); // public final ActionFrequency hDistCount = new ActionFrequency(3, 333);
public final ActionFrequency vDistCount = new ActionFrequency(3, 333); public final ActionFrequency vDistCount = new ActionFrequency(3, 333);
// Locations shared between all checks. // Locations shared between all checks.
@ -180,11 +180,14 @@ public class MovingData extends ACheckData {
toWasReset = fromWasReset = false; // TODO: true maybe toWasReset = fromWasReset = false; // TODO: true maybe
} }
/**
* Clear accounting data.
*/
public void clearAccounting() { public void clearAccounting() {
final long now = System.currentTimeMillis(); final long now = System.currentTimeMillis();
hDistSum.clear(now); // hDistSum.clear(now);
vDistSum.clear(now); vDistSum.clear(now);
hDistCount.clear(now); // hDistCount.clear(now);
vDistCount.clear(now); vDistCount.clear(now);
} }
@ -206,11 +209,21 @@ public class MovingData extends ACheckData {
noFallSkipAirCheck = false; noFallSkipAirCheck = false;
} }
/**
* Just reset the "last locations" references.
* @param loc
*/
public void resetPositions(final Location loc){ public void resetPositions(final Location loc){
if (loc == null) resetPositions(Double.MAX_VALUE, 0, 0); if (loc == null) resetPositions(Double.MAX_VALUE, 0, 0);
else resetPositions(loc.getX(), loc.getY(), loc.getZ()); else resetPositions(loc.getX(), loc.getY(), loc.getZ());
} }
/**
* Just reset the "last locations" references.
* @param x
* @param y
* @param z
*/
public void resetPositions(final double x, final double y, final double z) { public void resetPositions(final double x, final double y, final double z) {
fromX = toX = x; fromX = toX = x;
fromY = toY = y; fromY = toY = y;

View File

@ -313,7 +313,7 @@ public class SurvivalFly extends Check {
final String plYs = from.getY() == plY ? "" : ("|" + CheckUtils.fdec3.format(plY)); final String plYs = from.getY() == plY ? "" : ("|" + CheckUtils.fdec3.format(plY));
builder.append(player.getName() + " y: " + CheckUtils.fdec3.format(from.getY()) + plYs + (fromOnGround ? "(onground)" : "") + (data.noFallAssumeGround ? "(assumeonground)" : "") + " -> " + CheckUtils.fdec3.format(to.getY()) + (toOnGround ? "(onground)" : "") + "\n"); builder.append(player.getName() + " y: " + CheckUtils.fdec3.format(from.getY()) + plYs + (fromOnGround ? "(onground)" : "") + (data.noFallAssumeGround ? "(assumeonground)" : "") + " -> " + CheckUtils.fdec3.format(to.getY()) + (toOnGround ? "(onground)" : "") + "\n");
if (!resetFrom && !resetTo) { if (!resetFrom && !resetTo) {
if (cc.survivalFlyAccountingH && data.hDistCount.bucketScore(1) > 0 && data.hDistCount.bucketScore(2) > 0) builder.append(player.getName() + " hacc=" + data.hDistSum.bucketScore(2) + "->" + data.hDistSum.bucketScore(1) + "\n"); // if (cc.survivalFlyAccountingH && data.hDistCount.bucketScore(1) > 0 && data.hDistCount.bucketScore(2) > 0) builder.append(player.getName() + " hacc=" + data.hDistSum.bucketScore(2) + "->" + data.hDistSum.bucketScore(1) + "\n");
if (cc.survivalFlyAccountingV && data.vDistCount.bucketScore(1) > 0 && data.vDistCount.bucketScore(2) > 0) builder.append(player.getName() + " vacc=" + data.vDistSum.bucketScore(2) + "->" + data.vDistSum.bucketScore(1) + "\n"); if (cc.survivalFlyAccountingV && data.vDistCount.bucketScore(1) > 0 && data.vDistCount.bucketScore(2) > 0) builder.append(player.getName() + " vacc=" + data.vDistSum.bucketScore(2) + "->" + data.vDistSum.bucketScore(1) + "\n");
} }
if (player.isSleeping()) tags.add("sleeping"); if (player.isSleeping()) tags.add("sleeping");