From 7f4d47505e57f11c01308a2bc43e869465b25fc7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 16 Oct 2023 18:46:44 -0500 Subject: [PATCH] teleport cleanup --- src/engine/gameManager/MovementManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/gameManager/MovementManager.java b/src/engine/gameManager/MovementManager.java index 516c74e7..2ef2d5bb 100644 --- a/src/engine/gameManager/MovementManager.java +++ b/src/engine/gameManager/MovementManager.java @@ -470,10 +470,14 @@ public enum MovementManager { if (targetLoc == null) return; teleporter.stopMovement(targetLoc); + Vector3fImmutable oldLoc = new Vector3fImmutable(teleporter.getLoc()); teleporter.setLoc(targetLoc); if (teleporter.getObjectType().equals(GameObjectType.PlayerCharacter)) 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) {