forked from MagicBane/Server
teleport cleanup
This commit is contained in:
@@ -470,10 +470,14 @@ public enum MovementManager {
|
|||||||
if (targetLoc == null)
|
if (targetLoc == null)
|
||||||
return;
|
return;
|
||||||
teleporter.stopMovement(targetLoc);
|
teleporter.stopMovement(targetLoc);
|
||||||
|
Vector3fImmutable oldLoc = new Vector3fImmutable(teleporter.getLoc());
|
||||||
teleporter.setLoc(targetLoc);
|
teleporter.setLoc(targetLoc);
|
||||||
if (teleporter.getObjectType().equals(GameObjectType.PlayerCharacter))
|
if (teleporter.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||||
InterestManager.INTERESTMANAGER.HandleLoadForTeleport((PlayerCharacter) teleporter);
|
InterestManager.INTERESTMANAGER.HandleLoadForTeleport((PlayerCharacter) teleporter);
|
||||||
|
|
||||||
|
TeleportToPointMsg msg = new TeleportToPointMsg(teleporter, targetLoc.getX(), targetLoc.getY(), targetLoc.getZ(), 0, -1, -1);
|
||||||
|
DispatchMessage.dispatchMsgToInterestArea(oldLoc, teleporter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void syncLoc(AbstractCharacter ac, Vector3fImmutable clientLoc, boolean useClientLoc) {
|
private static void syncLoc(AbstractCharacter ac, Vector3fImmutable clientLoc, boolean useClientLoc) {
|
||||||
|
|||||||
Reference in New Issue
Block a user