Do data.resetTeleported(), if the player is there on tick.

Can't do much better than being there already. Thinkable trouble could
be with high latency and multiple teleports to different locations in
quick succession, so that cancelling the teleport will lead to the
player violating survivalfly again in the future, which means longer
freezing/rubberbanding than if we teleport now. However, current
assumption is, that it's better not to keep teleporting players around.
This commit is contained in:
asofold 2017-04-08 15:50:56 +02:00
parent 9a4b3f6f91
commit 2f59297621

View File

@ -438,6 +438,7 @@ public class MovingUtil {
if (data.debug) {
CheckUtils.debug(player, CheckType.MOVING, debugMessagePrefix + "Skip teleport, player is there, already.");
}
data.resetTeleported(); // Not necessary to keep.
useLoc.setWorld(null);
return false;
}
@ -457,6 +458,7 @@ public class MovingUtil {
if (data.debug) {
CheckUtils.debug(player, CheckType.MOVING, debugMessagePrefix + "Skip teleport, having received an ACK for the teleport on packet level.");
}
// Keep teleported in data. Subject to debug logs and/or discussion.
return false;
}
}