- EXPLORE goal can now be complete soAI won't get stuck

- AI won't try to visit tiles occupied by allied heroes by default
This commit is contained in:
DjWarmonger committed 2012-05-09 07:56:39 +00:00
1 parent 05742afd60
commit b597171f91
3 files changed
+14 -3

No files matched your search

+1 -1
View File
@@ -156,7 +156,7 @@ BattleAction CStupidAI::activeStack( const CStack * stack )
else
{
const EnemyInfo &ei= *std::min_element(enemiesUnreachable.begin(), enemiesUnreachable.end(), boost::bind(isCloser, _1, _2, boost::ref(dists)));
if(distToNearestNeighbour(ei.s->position, dists) < GameConstants::BFIELD_SIZE)
if(distToNearestNeighbour(ei.s->position, dists) < GameConstants::BFIELD_SIZE) //FIXME: rare crash when AI attacks banks
{
return goTowards(stack, ei.s->position);
}