small logic simplification for better readability

This commit is contained in:
Gunter Labes 2008-10-28 17:15:14 +00:00
parent 29f94e070c
commit 62d4066a86

View file

@ -554,7 +554,7 @@ map_location ai_interface::move_unit_partial(location from, location to,
std::vector<location> steps = rt->second.steps;
while(steps.empty() == false && (!(info_.units.find(to) == info_.units.end() || from == to))){
while(steps.empty() == false && info_.units.find(to) != info_.units.end() && from != to){
LOG_AI << "AI attempting illegal move. Attempting to move onto existing unit\n";
LOG_AI << "\t" << info_.units.find(to)->second.underlying_id() <<" already on " << to << "\n";
LOG_AI <<"\tremoving "<<*(steps.end()-1)<<"\n";