Browse Source

fix for mob sync and ghost mobs

master
FatBoy-DOTC 1 year ago
parent
commit
aa0067c117
  1. 5
      src/engine/ai/MobileFSM.java
  2. 5
      src/engine/objects/Mob.java

5
src/engine/ai/MobileFSM.java

@ -377,7 +377,10 @@ public class MobileFSM { @@ -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);

5
src/engine/objects/Mob.java

@ -1396,7 +1396,8 @@ public class Mob extends AbstractIntelligenceAgent { @@ -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 { @@ -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();

Loading…
Cancel
Save