mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-19 18:31:23 +02: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;
|
cancelled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (angle.isEnabled(player)) {
|
||||||
if (!cancelled && angle.isEnabled(player)){
|
// The "fast turning" checks are checked in any case because they accumulate data.
|
||||||
// Improbable yaw.
|
// Improbable yaw changing.
|
||||||
if (Combined.checkYawRate(player, player.getLocation().getYaw(), now, worldName, cc.yawRateCheck)){
|
if (Combined.checkYawRate(player, player.getLocation().getYaw(), now, worldName, cc.yawRateCheck)) {
|
||||||
// (Check or just feed).
|
// (Check or just feed).
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
}
|
}
|
||||||
// Angle check.
|
// Angle check.
|
||||||
if (angle.check(player, worldChanged)) cancelled = true;
|
if (angle.check(player, worldChanged)) cancelled = true;
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
// Always feed yaw rate here.
|
|
||||||
Combined.feedYawRate(player, player.getLocation().getYaw(), now, worldName);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cancelled && critical.isEnabled(player) && critical.check(player))
|
if (!cancelled && critical.isEnabled(player) && critical.check(player))
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user