fixed bug with replays and moving onto villages
This commit is contained in:
parent
8c22ad4faa
commit
287f8443fc
1 changed files with 7 additions and 3 deletions
|
@ -472,12 +472,16 @@ bool do_replay(display& disp, const gamemap& map, const game_data& gameinfo,
|
|||
disp.move_unit(rt->second.steps,current_unit);
|
||||
|
||||
current_unit.set_movement(rt->second.move_left);
|
||||
units.insert(std::pair<gamemap::location,unit>(dst,current_unit));
|
||||
if(map[dst.x][dst.y] == gamemap::TOWER) {
|
||||
current_unit.set_movement(0);
|
||||
get_tower(dst,teams,team_num-1);
|
||||
const int orig_owner = tower_owner(dst,teams);
|
||||
if(orig_owner != team_num) {
|
||||
current_unit.set_movement(0);
|
||||
get_tower(dst,teams,team_num-1);
|
||||
}
|
||||
}
|
||||
|
||||
units.insert(std::pair<gamemap::location,unit>(dst,current_unit));
|
||||
|
||||
if(!replayer.skipping()) {
|
||||
disp.draw_tile(dst.x,dst.y);
|
||||
disp.update_display();
|
||||
|
|
Loading…
Add table
Reference in a new issue