fixed a bug with count_free_hexes_in_castle...

...being incorrectly used when considering recruitment opportunities
in aspect_recruitment candidate action - it turned out that that
function doesn't count *current* free hexes in castle
This commit is contained in:
Iurii Chernyi 2009-11-12 11:02:11 +00:00
parent a70b56aa7d
commit f36decea40

View file

@ -128,9 +128,8 @@ double aspect_recruitment_phase::evaluate()
return BAD_SCORE;
}
std::set<map_location> checked_hexes;
checked_hexes.insert(leader->first);
if(count_free_hexes_in_castle(leader->first, checked_hexes)==0) {
map_location recruit_loc = find_vacant_tile(get_info().map, get_info().units, leader->first, VACANT_CASTLE);
if (!get_info().map.on_board(recruit_loc)) {
return BAD_SCORE;
}