mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 11:10:05 +01:00
Faster return for packets missing position or look data.
This commit is contained in:
parent
0fe398c233
commit
7db75f4d79
@ -111,10 +111,15 @@ public class TeleportQueue {
|
||||
* ACK.
|
||||
*/
|
||||
public AckResolution processAck(final DataPacketFlying packetData) {
|
||||
// Check packet.
|
||||
if (!packetData.hasPos || !packetData.hasLook) {
|
||||
return AckResolution.IDLE;
|
||||
}
|
||||
// Check queue.
|
||||
final AckResolution res;
|
||||
|
||||
lock.lock();
|
||||
if (expectIncoming.isEmpty() || !packetData.hasPos || !packetData.hasLook) {
|
||||
if (expectIncoming.isEmpty()) {
|
||||
res = AckResolution.IDLE;
|
||||
} else {
|
||||
res = getAckResolution(packetData);
|
||||
|
Loading…
Reference in New Issue
Block a user