small logic simplification for better readability
This commit is contained in:
parent
29f94e070c
commit
62d4066a86
1 changed files with 1 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue