Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core/AI: Fully move react state check from CreatureUnitRelocationWork…
…er to CreatureAI::MoveInLineOfSight. This means that AI for passive/defensive creatures can now once again use MoveInLineOfSight (and fixes that weird thing where triggers decided it would be funny to attack players).
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8e6fb3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be all put inside Creature::CanStartAttack, including the UNIT_STATE_SIGHTLESS check. Creature::CanStartAttack is only supposed to be used for the MoveInLoS attack checks.
8e6fb3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but arguably, if the creature is sightless, then
MoveInLineOfSight
shouldn't be called, ever.While
CanStartAttack
is used that way now, it's hard to tell what might happen in the future, so I'd prefer to keep it as is.