From 4bbe1db54ad8232a0512497c5d7e804436b605d1 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 29 Apr 2023 08:58:26 -0400 Subject: [PATCH] Bindloc for non slotted npcs. --- src/engine/objects/NPC.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 66b38c1f..7c180b05 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -341,7 +341,7 @@ public class NPC extends AbstractCharacter { private void initializeNPC() { int slot; - Vector3fImmutable slotLocation = Vector3fImmutable.ZERO; + Vector3fImmutable bindLocation = Vector3fImmutable.ZERO; if (ConfigManager.serverType.equals(ServerType.LOGINSERVER)) return; @@ -358,8 +358,8 @@ public class NPC extends AbstractCharacter { this.parentZone.zoneNPCSet.add(this); // Setup location for this NPC - - this.bindLoc = this.building.getLoc().add(this.bindLoc); + this.bindLoc = new Vector3fImmutable(this.statLat, this.statAlt, this.statLon); + this.bindLoc = this.parentZone.getLoc().add(this.bindLoc); this.loc = bindLoc; // Add this npc to the hireling list.