setLoc now handles region assignment

This commit is contained in:
2023-09-13 19:51:39 -05:00
parent f5d83aa259
commit 847e62dd27
4 changed files with 10 additions and 12 deletions
-4
View File
@@ -841,13 +841,11 @@ public class Mob extends AbstractIntelligenceAgent {
if (newLoc.equals(this.getEndLoc())) {
this.stopMovement(newLoc);
this.region = AbstractWorldObject.GetRegionByWorldObject(this);
return;
//Next upda
}
setLoc(newLoc);
this.region = AbstractWorldObject.GetRegionByWorldObject(this);
//Next update will be end Loc, lets stop him here.
}
@@ -971,8 +969,6 @@ public class Mob extends AbstractIntelligenceAgent {
if (this.building == null && this.guardCaptain != null && ((Mob) this.guardCaptain).behaviourType.equals(MobBehaviourType.GuardCaptain))
this.building = this.guardCaptain.building;
else if (this.building != null)
this.region = BuildingManager.GetRegion(this.building, bindLoc.x, bindLoc.y, bindLoc.z);
this.loadInventory();