mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-06 18:50:54 +01:00
Further confine pre-conditions for the sprintback check.
This commit is contained in:
parent
05372fbef4
commit
888c18a908
@ -233,10 +233,9 @@ public class SurvivalFly extends Check {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent players from sprinting if they're moving backwards (allow buffers to cover up !?).
|
// Prevent players from sprinting if they're moving backwards (allow buffers to cover up !?).
|
||||||
if (sprinting && data.lostSprintCount == 0) {
|
if (sprinting && data.lostSprintCount == 0 && !cc.assumeSprint && hDistance > walkSpeed && data.hVelActive.isEmpty()) {
|
||||||
// (Ignore if lost sprint is active, in order to forestall false positives.)
|
// (Ignore some cases, in order to prevent false positives.)
|
||||||
// TODO: Check if still necessary to check here with timeSprinting change (...).
|
// TODO: speed effects ?
|
||||||
// TODO: Find more ways to confine conditions.
|
|
||||||
final float yaw = from.getYaw();
|
final float yaw = from.getYaw();
|
||||||
if (xDistance < 0D && zDistance > 0D && yaw > 180F && yaw < 270F
|
if (xDistance < 0D && zDistance > 0D && yaw > 180F && yaw < 270F
|
||||||
|| xDistance < 0D && zDistance < 0D && yaw > 270F && yaw < 360F
|
|| xDistance < 0D && zDistance < 0D && yaw > 270F && yaw < 360F
|
||||||
|
Loading…
Reference in New Issue
Block a user