1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Little, but significant improvement in AI exploration.

This commit is contained in:
DjWarmonger 2012-05-05 13:08:15 +00:00
parent b4c58a5644
commit 9894deee55

View File

@ -305,6 +305,11 @@ bool isCloser(const CGObjectInstance *lhs, const CGObjectInstance *rhs)
return (ln->moveRemains > rn->moveRemains);
};
//bool isCloser (int3 pos1, int3 pos, const CGHeroInstance * h)
//{ //TODO
// return false;
//};
ui64 evaluateDanger(const CGObjectInstance *obj);
ui64 evaluateDanger(crint3 tile)
@ -2286,7 +2291,7 @@ TSubgoal CGoal::whatToDoToAchieve()
else
throw cannotFulfillGoalException("No heroes with remaining MPs for exploring!\n");
}
boost::sort(hs, compareHeroStrength);
boost::sort(hs, isCloser); //closer to what?
}
}