mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 10:57:47 +01:00
More % for yaw.
This commit is contained in:
parent
f9d44cd661
commit
7f17420606
@ -47,9 +47,9 @@ public class Combined {
|
|||||||
public static final void feedYawRate(final Player player, float yaw, final long now, final String worldName, final CombinedData data) {
|
public static final void feedYawRate(final Player player, float yaw, final long now, final String worldName, final CombinedData data) {
|
||||||
// Reset on world change or timeout.
|
// Reset on world change or timeout.
|
||||||
|
|
||||||
// Ensure the yaw is within bounds (TODO: better method, maybe).
|
// Ensure the yaw is within bounds.
|
||||||
while (yaw <= -360.0) yaw += 360.0;
|
if (yaw <= -360f) yaw = -((-yaw) % 360f);
|
||||||
if (yaw >= 360.0) yaw -= 360.0;
|
else if (yaw >= 360f) yaw = yaw % 360f;
|
||||||
|
|
||||||
// Timeout, world change.
|
// Timeout, world change.
|
||||||
if (now - data.lastYawTime > 999 || !worldName.equals(data.lastWorld)){
|
if (now - data.lastYawTime > 999 || !worldName.equals(data.lastWorld)){
|
||||||
|
Loading…
Reference in New Issue
Block a user