From c581d19990c7f56e8f0e09d882117cb7db968abd Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 8 Jan 2025 17:36:51 -0600 Subject: [PATCH] mob ai work --- src/engine/objects/AbstractCharacter.java | 1 - src/engine/objects/Mob.java | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index eb1345f9..3c942a8f 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -983,7 +983,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject { public final void setLoc(final Vector3fImmutable value) { super.setLoc(value); // set the location in the world this.resetLastSetLocUpdate(); - WorldGrid.updateObject(this); } public Vector3fImmutable getMovementLoc() { diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index b2c89218..f4ab051c 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -2159,8 +2159,10 @@ public class Mob extends AbstractIntelligenceAgent { Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius); this.patrolPoints.add(newPatrolPoint); - if (i == 1) + if (i == 1) { MovementManager.translocate(this, newPatrolPoint, null); + WorldGrid.updateObject(this); + } } }