Browse Source

mob ai work

lakebane-mobai2
FatBoy-DOTC 1 week ago
parent
commit
c581d19990
  1. 1
      src/engine/objects/AbstractCharacter.java
  2. 4
      src/engine/objects/Mob.java

1
src/engine/objects/AbstractCharacter.java

@ -983,7 +983,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
public final void setLoc(final Vector3fImmutable value) { public final void setLoc(final Vector3fImmutable value) {
super.setLoc(value); // set the location in the world super.setLoc(value); // set the location in the world
this.resetLastSetLocUpdate(); this.resetLastSetLocUpdate();
WorldGrid.updateObject(this);
} }
public Vector3fImmutable getMovementLoc() { public Vector3fImmutable getMovementLoc() {

4
src/engine/objects/Mob.java

@ -2159,8 +2159,10 @@ public class Mob extends AbstractIntelligenceAgent {
Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius); Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius);
this.patrolPoints.add(newPatrolPoint); this.patrolPoints.add(newPatrolPoint);
if (i == 1) if (i == 1) {
MovementManager.translocate(this, newPatrolPoint, null); MovementManager.translocate(this, newPatrolPoint, null);
WorldGrid.updateObject(this);
}
} }
} }

Loading…
Cancel
Save