From 3561564f8ceeebc0d79c21281b812fefdd43aff9 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 11 Mar 2025 20:00:44 -0500 Subject: [PATCH] fix location desync caused by power casting --- src/engine/gameManager/MovementManager.java | 3 +++ src/engine/gameManager/PowersManager.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/MovementManager.java b/src/engine/gameManager/MovementManager.java index 9ef9eab8..52fa09b0 100644 --- a/src/engine/gameManager/MovementManager.java +++ b/src/engine/gameManager/MovementManager.java @@ -107,6 +107,9 @@ public enum MovementManager { // ((Mob)toMove).updateLocation(); // get start and end locations for the move Vector3fImmutable startLocation = new Vector3fImmutable(msg.getStartLat(), msg.getStartAlt(), msg.getStartLon()); + //if(toMove.isMoving()){ + // startLocation = toMove.getMovementLoc(); + //} Vector3fImmutable endLocation = new Vector3fImmutable(msg.getEndLat(), msg.getEndAlt(), msg.getEndLon()); // if (toMove.getObjectType() == GameObjectType.PlayerCharacter) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 02103393..87d2d403 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -172,8 +172,8 @@ public enum PowersManager { if(!pc.isFlying() && powersBaseByToken.get(msg.getPowerUsedID()) != null && powersBaseByToken.get(msg.getPowerUsedID()).isSpell) //cant be sitting if flying CombatManager.toggleSit(false,origin); - if(pc.isMoving()) - pc.stopMovement(pc.getMovementLoc()); + //if(pc.isMoving()) + //pc.stopMovement(pc.getMovementLoc()); if(msg.getPowerUsedID() != 421084024 && origin.getPlayerCharacter().getPromotionClassID() != 2513) { if (!origin.getPlayerCharacter().getPowers().containsKey(msg.getPowerUsedID())) { Logger.error(origin.getPlayerCharacter().getFirstName() + " attempted to cast a power they do not have");