mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-03-13 06:59:30 +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.
|
* ACK.
|
||||||
*/
|
*/
|
||||||
public AckResolution processAck(final DataPacketFlying packetData) {
|
public AckResolution processAck(final DataPacketFlying packetData) {
|
||||||
|
// Check packet.
|
||||||
|
if (!packetData.hasPos || !packetData.hasLook) {
|
||||||
|
return AckResolution.IDLE;
|
||||||
|
}
|
||||||
|
// Check queue.
|
||||||
final AckResolution res;
|
final AckResolution res;
|
||||||
|
|
||||||
lock.lock();
|
lock.lock();
|
||||||
if (expectIncoming.isEmpty() || !packetData.hasPos || !packetData.hasLook) {
|
if (expectIncoming.isEmpty()) {
|
||||||
res = AckResolution.IDLE;
|
res = AckResolution.IDLE;
|
||||||
} else {
|
} else {
|
||||||
res = getAckResolution(packetData);
|
res = getAckResolution(packetData);
|
||||||
|
Loading…
Reference in New Issue
Block a user