From c029a881e9722af82d5bd56b98c2725ee5272426 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 30 Apr 2023 09:23:56 -0400 Subject: [PATCH] Location serialization matches NPC --- src/engine/objects/Mob.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 9c97e43f..71408ec5 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -354,9 +354,12 @@ public class Mob extends AbstractIntelligenceAgent { writer.putFloat(1.0f); } - //Believe this is spawn loc, ignore for now + // Location serialization matches NPC - writer.putVector3f(mob.getLoc()); + if (mob.region != null) + writer.putVector3f(ZoneManager.convertWorldToLocal(mob.building, mob.getLoc())); + else + writer.putVector3f(mob.getLoc()); //Rotation