mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 20:02:54 +00:00
fixed assertion failure in actions.cpp
This commit is contained in:
parent
da7a5d675a
commit
624f77bb7a
@ -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(),
|
paths::route route = a_star_search(ui->first,ui->second.get_goto(),
|
||||||
10000.0,calc,teleports);
|
10000.0,calc,teleports);
|
||||||
|
if(route.steps.empty())
|
||||||
|
continue;
|
||||||
|
|
||||||
gui.set_route(&route);
|
gui.set_route(&route);
|
||||||
const size_t moves =
|
const size_t moves =
|
||||||
move_unit(&gui,map,units,teams,route.steps,&recorder,&undo_stack);
|
move_unit(&gui,map,units,teams,route.steps,&recorder,&undo_stack);
|
||||||
if(moves > 0) {
|
if(moves > 0) {
|
||||||
redo_stack.clear();
|
redo_stack.clear();
|
||||||
if(moves == route.steps.size()) {
|
|
||||||
u.set_goto(gamemap::location());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user