diff --git a/src/engine/net/client/handlers/MinionTrainingMsgHandler.java b/src/engine/net/client/handlers/MinionTrainingMsgHandler.java index 7499f414..3d2afe07 100644 --- a/src/engine/net/client/handlers/MinionTrainingMsgHandler.java +++ b/src/engine/net/client/handlers/MinionTrainingMsgHandler.java @@ -160,19 +160,18 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler { Building building = BuildingManager.getBuilding(((MinionTrainingMessage) baseMsg).getBuildingID()); int slot = ((NPC) siegeMob.npcOwner).getSiegeMinionMap().get(siegeMob); - Vector3fImmutable slotLocation; siegeMob.building = building; siegeMob.parentZone = zone; - BuildingLocation buildingLocation = BuildingManager._slotLocations.get(building.meshUUID).get(slot); - slotLocation = building.getLoc().add(buildingLocation.getLocation()); + BuildingLocation slotLocation = BuildingManager._slotLocations.get(building.meshUUID).get(slot); + siegeMob.bindLoc = building.getLoc().add(slotLocation.getLocation()); // Rotate slot position by the building rotation - slotLocation = Vector3fImmutable.rotateAroundPoint(building.getLoc(), slotLocation, building.getBounds().getQuaternion().angleY); - siegeMob.setEndLoc(new Vector3fImmutable(slotLocation)); + siegeMob.bindLoc = Vector3fImmutable.rotateAroundPoint(building.getLoc(), siegeMob.bindLoc, building.getBounds().getQuaternion().angleY); - siegeMob.setBindLoc(slotLocation); + siegeMob.loc = new Vector3fImmutable(siegeMob.bindLoc); + siegeMob.endLoc = new Vector3fImmutable(siegeMob.bindLoc); zone.zoneMobSet.add(siegeMob); siegeMob.setLoc(siegeMob.getBindLoc()); diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index 6f4bee73..8685d371 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -60,7 +60,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { protected short statSpiCurrent; protected short unusedStatPoints; protected int exp; - protected Vector3fImmutable bindLoc; + public Vector3fImmutable bindLoc; protected Vector3fImmutable faceDir; protected Guild guild; protected byte runningTrains; @@ -71,7 +71,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { protected boolean walkMode; protected boolean combat = false; protected Vector3fImmutable startLoc = Vector3fImmutable.ZERO; - protected Vector3fImmutable endLoc = Vector3fImmutable.ZERO; + public Vector3fImmutable endLoc = Vector3fImmutable.ZERO; protected boolean itemCasting = false; // nextEndLoc is used to store the next end location when someone is clicking // around the ground while other timers like changeAltitude are still diff --git a/src/engine/objects/AbstractWorldObject.java b/src/engine/objects/AbstractWorldObject.java index 8856af1d..97d8a5d1 100644 --- a/src/engine/objects/AbstractWorldObject.java +++ b/src/engine/objects/AbstractWorldObject.java @@ -48,7 +48,7 @@ public abstract class AbstractWorldObject extends AbstractGameObject { public Regions region; public Regions landingRegion = null; public Vector3fImmutable lastLoc = Vector3fImmutable.ZERO; - protected Vector3fImmutable loc = new Vector3fImmutable(0.0f, 0.0f, 0.0f); + public Vector3fImmutable loc = new Vector3fImmutable(0.0f, 0.0f, 0.0f); protected AtomicFloat health = new AtomicFloat(); protected boolean load = true; protected GridObjectType gridObjectType;