MAXIMALLY.

This commit is contained in:
asofold 2013-01-29 03:48:08 +01:00
parent 562f1da59b
commit a8f326d855

View File

@ -115,7 +115,7 @@ public class FightListener extends CheckListener {
// TODO: Maybe use 3d distance if dy(normalized) is too big. // TODO: Maybe use 3d distance if dy(normalized) is too big.
targetMove = CheckUtils.distance(data.lastAttackedX, data.lastAttackedZ, targetLoc.getX(), targetLoc.getZ()); targetMove = CheckUtils.distance(data.lastAttackedX, data.lastAttackedZ, targetLoc.getX(), targetLoc.getZ());
msAge = (long) (50f * TickTask.getLag(50L * tickAge) * (float) tickAge); msAge = (long) (50f * TickTask.getLag(50L * tickAge) * (float) tickAge);
normalizedMove = msAge == 0 ? targetMove : targetMove * Math.max(20.0, 1000.0 / (double) msAge); normalizedMove = msAge == 0 ? targetMove : targetMove * Math.min(20.0, 1000.0 / (double) msAge);
} }
// TODO: calculate factor for dists: ticks * 50 * lag // TODO: calculate factor for dists: ticks * 50 * lag