forked from MagicBane/Server
setLoc now handles region assignment
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user