Browse Source

teleport cleanup

combat-2
FatBoy-DOTC 1 year ago
parent
commit
7f4d47505e
  1. 4
      src/engine/gameManager/MovementManager.java

4
src/engine/gameManager/MovementManager.java

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

Loading…
Cancel
Save