Faster return for packets missing position or look data.

This commit is contained in:
asofold 2015-12-09 11:48:46 +01:00
parent 0fe398c233
commit 7db75f4d79

View File

@ -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);