mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 10:57:47 +01:00
Adapt debug logging to show full move always.
This commit is contained in:
parent
fbc85de617
commit
3cbae00fbb
@ -374,6 +374,18 @@ public class MovingListener extends CheckListener{
|
||||
|
||||
final MovingConfig cc = MovingConfig.getConfig(player);
|
||||
moveInfo.set(player, from, to, cc.yOnGround);
|
||||
|
||||
if (cc.debug) {
|
||||
StringBuilder builder = new StringBuilder(250);
|
||||
final Location loc = player.getLocation();
|
||||
builder.append(player.getName());
|
||||
builder.append(" " + from.getWorld().getName() + " " + CheckUtils.fdec3.format(from.getX()) + (from.getX() == loc.getX() ? "" : ("(" + CheckUtils.fdec3.format(loc.getX()) + ")")));
|
||||
builder.append(", " + CheckUtils.fdec3.format(from.getY()) + (from.getY() == loc.getY() ? "" : ("(" + CheckUtils.fdec3.format(loc.getY()) + ")")));
|
||||
builder.append(", " + CheckUtils.fdec3.format(from.getZ()) + (from.getZ() == loc.getZ() ? "" : ("(" + CheckUtils.fdec3.format(loc.getZ()) + ")")));
|
||||
builder.append(" -> " + CheckUtils.fdec3.format(to.getX()) + ", " + CheckUtils.fdec3.format(to.getY()) + ", " + CheckUtils.fdec3.format(to.getZ()));
|
||||
System.out.print(builder.toString());
|
||||
}
|
||||
|
||||
final MovingData data = MovingData.getData(player);
|
||||
data.noFallAssumeGround = false;
|
||||
data.teleported = null;
|
||||
|
@ -307,11 +307,9 @@ public class SurvivalFly extends Check {
|
||||
if (cc.debug) {
|
||||
// TODO: also show resetcond (!)
|
||||
StringBuilder builder = new StringBuilder(500);
|
||||
builder.append(player.getName() + " vfreedom: " + CheckUtils.fdec3.format(data.verticalFreedom) + " (vv=" + CheckUtils.fdec3.format(data.verticalVelocity) + "/vvc=" + data.verticalVelocityCounter + "), jumpphase: " + data.sfJumpPhase + "\n");
|
||||
builder.append(player.getName() + " ground: " + (data.noFallAssumeGround ? "(assumeonground) " : "") + (fromOnGround ? "onground -> " : (resetFrom ? "resetcond -> " : "--- -> ")) + (toOnGround ? "onground" : (resetTo ? "resetcond" : "---")) + "\n");
|
||||
builder.append(player.getName() + " hDist: " + CheckUtils.fdec3.format(hDistance) + " / " + CheckUtils.fdec3.format(hAllowedDistance) + " , vDist: " + CheckUtils.fdec3.format(yDistance) + " / " + CheckUtils.fdec3.format(vAllowedDistance) + "\n");
|
||||
final double plY = player.getLocation().getY();
|
||||
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() + " vfreedom: " + CheckUtils.fdec3.format(data.verticalFreedom) + " (vv=" + CheckUtils.fdec3.format(data.verticalVelocity) + "/vvc=" + data.verticalVelocityCounter + "), jumpphase: " + data.sfJumpPhase + "\n");
|
||||
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.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");
|
||||
|
Loading…
Reference in New Issue
Block a user