From cace195e183f28df78dbb0623c817908d9d11fc3 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 29 Apr 2023 14:36:39 -0400 Subject: [PATCH] Logic and comment cleanup. --- src/engine/objects/Mob.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index dd0f0340..07992d86 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -825,17 +825,19 @@ public class Mob extends AbstractIntelligenceAgent { if (this.building != null) { - // Mobiles inside buildings are offset from it not the zone + if (this.contract == null) { - this.bindLoc = new Vector3fImmutable(this.statLat, this.statAlt, this.statLon); - this.bindLoc = this.building.getLoc().add(this.bindLoc); - this.loc = new Vector3fImmutable(bindLoc); - this.endLoc = new Vector3fImmutable(bindLoc); + // Mobiles inside buildings are offset from it not the zone - if (this.contract != null) { + this.bindLoc = new Vector3fImmutable(this.statLat, this.statAlt, this.statLon); + this.bindLoc = this.building.getLoc().add(this.bindLoc); + this.loc = new Vector3fImmutable(bindLoc); + this.endLoc = new Vector3fImmutable(bindLoc); + + } else { // Get next available slot for this Mobile and then - // add it to the building's hireling list + // add it to the building's hireling list slot = BuildingManager.getAvailableSlot(building); @@ -844,8 +846,8 @@ public class Mob extends AbstractIntelligenceAgent { building.getHirelings().put(this, slot); - // Override bind and location for this Mobile derived - // from BuildingManager slot location data. + // Override bind and location for this contracted Mobile + // derived from BuildingManager slot location data. slotLocation = BuildingManager.getSlotLocation(building, slot);