mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-08-31 09:39:32 +02: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) {
|
||||
// Reset on world change or timeout.
|
||||
|
||||
// Ensure the yaw is within bounds (TODO: better method, maybe).
|
||||
while (yaw <= -360.0) yaw += 360.0;
|
||||
if (yaw >= 360.0) yaw -= 360.0;
|
||||
// Ensure the yaw is within bounds.
|
||||
if (yaw <= -360f) yaw = -((-yaw) % 360f);
|
||||
else if (yaw >= 360f) yaw = yaw % 360f;
|
||||
|
||||
// Timeout, world change.
|
||||
if (now - data.lastYawTime > 999 || !worldName.equals(data.lastWorld)){
|
||||
|
|
Loading…
Reference in New Issue
Block a user