mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-29 23:17:41 +02:00
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:
parent
9a4b3f6f91
commit
2f59297621
@ -438,6 +438,7 @@ public class MovingUtil {
|
|||||||
if (data.debug) {
|
if (data.debug) {
|
||||||
CheckUtils.debug(player, CheckType.MOVING, debugMessagePrefix + "Skip teleport, player is there, already.");
|
CheckUtils.debug(player, CheckType.MOVING, debugMessagePrefix + "Skip teleport, player is there, already.");
|
||||||
}
|
}
|
||||||
|
data.resetTeleported(); // Not necessary to keep.
|
||||||
useLoc.setWorld(null);
|
useLoc.setWorld(null);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -457,6 +458,7 @@ public class MovingUtil {
|
|||||||
if (data.debug) {
|
if (data.debug) {
|
||||||
CheckUtils.debug(player, CheckType.MOVING, debugMessagePrefix + "Skip teleport, having received an ACK for the teleport on packet level.");
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user