mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 12:10:37 +01:00
Compromise: Completely bind yawrate(fight) to the angle check.
To avoid compatibility issues with exemptions the yawrate feeding/checking is now only done if angle is enabled. As a compromise both are still checked, even if speed has already cancelled the event, because the "fast turning" checks both accumulate data and depend on not missing players attempts.
This commit is contained in:
parent
17395cb742
commit
dd1da82abd
@ -116,20 +116,16 @@ public class FightListener implements Listener {
|
||||
cancelled = true;
|
||||
}
|
||||
|
||||
|
||||
if (!cancelled && angle.isEnabled(player)){
|
||||
// Improbable yaw.
|
||||
if (Combined.checkYawRate(player, player.getLocation().getYaw(), now, worldName, cc.yawRateCheck)){
|
||||
// (Check or just feed).
|
||||
cancelled = true;
|
||||
}
|
||||
// Angle check.
|
||||
if (angle.check(player, worldChanged)) cancelled = true;
|
||||
}
|
||||
else{
|
||||
// Always feed yaw rate here.
|
||||
Combined.feedYawRate(player, player.getLocation().getYaw(), now, worldName);
|
||||
}
|
||||
if (angle.isEnabled(player)) {
|
||||
// The "fast turning" checks are checked in any case because they accumulate data.
|
||||
// Improbable yaw changing.
|
||||
if (Combined.checkYawRate(player, player.getLocation().getYaw(), now, worldName, cc.yawRateCheck)) {
|
||||
// (Check or just feed).
|
||||
cancelled = true;
|
||||
}
|
||||
// Angle check.
|
||||
if (angle.check(player, worldChanged)) cancelled = true;
|
||||
}
|
||||
|
||||
if (!cancelled && critical.isEnabled(player) && critical.check(player))
|
||||
cancelled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user