From aa0067c117c422d21a09c43a9798043a00ccd656 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 19 Jul 2023 18:27:10 -0500 Subject: [PATCH] fix for mob sync and ghost mobs --- src/engine/ai/MobileFSM.java | 5 ++++- src/engine/objects/Mob.java | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index d856b162..26cf8cbb 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -377,7 +377,10 @@ public class MobileFSM { if (mob.combatTarget != null && mob.combatTarget.isAlive() == false) { mob.setCombatTarget(null); } - mob.updateLocation(); + //mob.updateLocation(); + if(mob.isMoving()){ + mob.setLoc(mob.getMovementLoc()); + } switch (mob.BehaviourType) { case GuardCaptain: GuardCaptainLogic(mob); diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index e6f4b5db..d9941202 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1396,7 +1396,8 @@ public class Mob extends AbstractIntelligenceAgent { this.isAlive.set(true); this.deathTime = 0; this.lastBindLoc = this.bindLoc; - this.setLoc(this.lastBindLoc); + //this.setLoc(this.lastBindLoc); + this.setLoc(bindLoc); this.stopMovement(this.lastBindLoc); NPCManager.applyRuneSetEffects(this); this.recalculateStats(); @@ -1406,7 +1407,7 @@ public class Mob extends AbstractIntelligenceAgent { } else if (this.building != null) { this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z); } - MovementManager.translocate(this, this.bindLoc, this.region); + //MovementManager.translocate(this, this.bindLoc, this.region); if (!this.isSiege && !this.isPlayerGuard && contract == null) loadInventory();