Browse Source

Fix Monster Line of Sight (#7988)

pull/7991/head
Eric Robinson 10 months ago committed by GitHub
parent
commit
7d8d1bc36a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      Source/monster.cpp

2
Source/monster.cpp

@ -1747,7 +1747,7 @@ bool AiPlanPath(Monster &monster)
}
bool clear = LineClear(
[&monster](Point position) { return IsTileAvailable(monster, position); },
[&monster](Point position) { return (IsTileWalkable(position) && IsTileSafe(monster, position)); },
monster.position.tile,
monster.enemyPosition);
if (!clear || (monster.pathCount >= 5 && monster.pathCount < 8)) {

Loading…
Cancel
Save