fixed assertion failure in actions.cpp
This commit is contained in:
parent
da7a5d675a
commit
624f77bb7a
1 changed files with 3 additions and 3 deletions
|
@ -83,14 +83,14 @@ void play_turn(game_data& gameinfo, game_state& state_of_game,
|
|||
|
||||
paths::route route = a_star_search(ui->first,ui->second.get_goto(),
|
||||
10000.0,calc,teleports);
|
||||
if(route.steps.empty())
|
||||
continue;
|
||||
|
||||
gui.set_route(&route);
|
||||
const size_t moves =
|
||||
move_unit(&gui,map,units,teams,route.steps,&recorder,&undo_stack);
|
||||
if(moves > 0) {
|
||||
redo_stack.clear();
|
||||
if(moves == route.steps.size()) {
|
||||
u.set_goto(gamemap::location());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue