temporary fix for ai moving two units onto one location;

rusty should probably take a look at this, since this added check
shouldn't be necessary
This commit is contained in:
Dominic Bolin 2006-06-22 14:38:40 +00:00
parent 63d3dab8eb
commit 25947137fd

View File

@ -161,7 +161,7 @@ void ai::do_attack_analysis(
}
//if the unit can't move to this location
if(its.first == its.second) {
if(its.first == its.second || units_.find(tiles[j]) != units_.end()) {
continue;
}
@ -219,7 +219,7 @@ void ai::do_attack_analysis(
if(cur_position != -1) {
units.erase(units.begin() + i);
cur_analysis.movements.push_back(std::pair<location,location>(current_unit,tiles[cur_position]));
cur_analysis.vulnerability += best_vulnerability;