fix movement not changing the unit's direction
This commit is contained in:
parent
ab691737e7
commit
b380de50b8
3 changed files with 4 additions and 2 deletions
|
@ -502,6 +502,7 @@ Selim Farsakoğlu
|
|||
[about]
|
||||
title = _ "Contributors"
|
||||
text = "
|
||||
Daniel Bruegmann
|
||||
Ely Levy (Nakee)
|
||||
Frédéric Wagner
|
||||
Jeff Breidenbach (jab)
|
||||
|
|
|
@ -122,7 +122,7 @@ bool unit_visible_on_path(display& disp, const std::vector<gamemap::location>& p
|
|||
return false;
|
||||
}
|
||||
|
||||
void move_unit(display& disp, const gamemap& map, const std::vector<gamemap::location>& path, const unit& u, const unit_map& units, const std::vector<team>& teams)
|
||||
void move_unit(display& disp, const gamemap& map, const std::vector<gamemap::location>& path, unit& u, const unit_map& units, const std::vector<team>& teams)
|
||||
{
|
||||
wassert(!path.empty());
|
||||
|
||||
|
@ -159,6 +159,7 @@ void move_unit(display& disp, const gamemap& map, const std::vector<gamemap::loc
|
|||
}
|
||||
}
|
||||
disp.remove_temporary_unit();
|
||||
u.set_facing(path[path.size()-2].get_relative_dir(path[path.size()-1]));
|
||||
|
||||
//make sure the entire path is cleaned properly
|
||||
for(std::vector<gamemap::location>::const_iterator it = path.begin(); it != path.end(); ++it) {
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace unit_display
|
|||
bool unit_visible_on_path(display& disp, const std::vector<gamemap::location>& path, const unit& u, const unit_map& units, const std::vector<team>& teams);
|
||||
|
||||
///a function to display a unit moving along a given path
|
||||
void move_unit(display& disp, const gamemap& map, const std::vector<gamemap::location>& path, const unit& u, const unit_map& units, const std::vector<team>& teams);
|
||||
void move_unit(display& disp, const gamemap& map, const std::vector<gamemap::location>& path, unit& u, const unit_map& units, const std::vector<team>& teams);
|
||||
|
||||
///a function to show a unit fading out. Note that this only shows the effect, it doesn't
|
||||
///actually kill the unit.
|
||||
|
|
Loading…
Add table
Reference in a new issue