From ca1b4cdf888d9cf134e0fdab324d8fdfe21bf97b Mon Sep 17 00:00:00 2001 From: Ali El Gariani Date: Sun, 15 Mar 2009 13:09:27 +0000 Subject: [PATCH] Improve animation and scrolling during move_unit_fake (by combining each path sections into one full path) --- src/game_events.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game_events.cpp b/src/game_events.cpp index 651c5dbc131..7b383b29577 100644 --- a/src/game_events.cpp +++ b/src/game_events.cpp @@ -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); } }