mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
NPCs don't need to be aggressive to "pathfind" the player anymore.
This commit is contained in:
@@ -108,7 +108,7 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
}
|
||||
|
||||
private void determineMonsterNextPosition(Monster m, MonsterSpawnArea area, Coord playerPosition) {
|
||||
if (m.isAgressive()) {
|
||||
// if (m.isAgressive()) {
|
||||
boolean searchForPath = false;
|
||||
if (m.getMovementAggressionType() == MonsterType.AggressionType.protectSpawn) {
|
||||
if (area.area.contains(playerPosition)) searchForPath = true;
|
||||
@@ -118,7 +118,7 @@ public final class MonsterMovementController implements EvaluateWalkable {
|
||||
if (searchForPath) {
|
||||
if (findPathFor(m, playerPosition)) return;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
// Monster is moving in a straight line.
|
||||
m.nextPosition.topLeft.set(
|
||||
|
||||
Reference in New Issue
Block a user