Browse Source

teleport cleanup

magicbox-1.5.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 { @@ -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) {

Loading…
Cancel
Save