Improve animation and scrolling during move_unit_fake

(by combining each path sections into one full path)
This commit is contained in:
Ali El Gariani 2009-03-15 13:09:27 +00:00
parent d65eb91355
commit ca1b4cdf88

View File

@ -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);
}
}