mob ai work
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user