Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core/SAI: Fix an issue where SAI was ignoring civilian and passive un…
…it flags Closes #2526 Disclaimer: This was not thoroughly tested; report any issue caused by this change.
- Loading branch information
Showing
2 changed files
with
3 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1025,15 +1025,11 @@ namespace Trinity | |
return false; | ||
|
||
if (m_force) | ||
{ | ||
if (!me->IsValidAttackTarget(u)) | ||
return false; | ||
} | ||
else | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
DDuarte
Author
Contributor
|
||
{ | ||
if (!me->canStartAttack(u, false)) | ||
return false; | ||
} | ||
|
||
m_range = me->GetDistance(u); // use found unit range as new range limit for next check | ||
return true; | ||
|
By deleting "{}" this else is now coupled with "if (!me->IsValidAttackTarget(u))" instead of "if (m_force)". Is this your intention?