mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 03:02:11 +01:00
Bleeding: add consistency check for y-moving direction (accounting).
This commit is contained in:
parent
06a5d33542
commit
619359cc32
@ -332,6 +332,12 @@ public class SurvivalFly extends Check {
|
|||||||
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, vsc0 - vsc1);
|
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, vsc0 - vsc1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if y-direction is going upwards without speed / ground.
|
||||||
|
if (!data.noFallAssumeGround && yDistance > 0 && data.survivalFlyLastYDist < 0 && data.verticalFreedom <= 0.001) {
|
||||||
|
// Moving upwards without having touched the ground.
|
||||||
|
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final double result = (Math.max(hDistanceAboveLimit, 0D) + Math.max(vDistanceAboveLimit, 0D)) * 100D;
|
final double result = (Math.max(hDistanceAboveLimit, 0D) + Math.max(vDistanceAboveLimit, 0D)) * 100D;
|
||||||
|
Loading…
Reference in New Issue
Block a user