mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 15:45:36 +00:00
Improve animation and scrolling during move_unit_fake
(by combining each path sections into one full path)
This commit is contained in:
parent
d65eb91355
commit
ca1b4cdf88
@ -975,6 +975,7 @@ namespace {
|
||||
ERR_CF << "invalid move_unit_fake source: " << src << '\n';
|
||||
break;
|
||||
}
|
||||
path.push_back(src);
|
||||
continue;
|
||||
}
|
||||
shortest_path_calculator calc(dummy_unit,
|
||||
@ -1009,10 +1010,15 @@ namespace {
|
||||
assert(route.steps.size() > 0);
|
||||
}
|
||||
}
|
||||
unit_display::move_unit(route.steps, dummy_unit, *teams);
|
||||
// we add this section to the end of the complete path
|
||||
// skipping section's head because already included
|
||||
// by the previous iteration
|
||||
path.insert(path.end(),
|
||||
route.steps.begin()+1, route.steps.end());
|
||||
|
||||
src = dst;
|
||||
}
|
||||
unit_display::move_unit(path, dummy_unit, *teams);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user