Fix bug in teleport animation
temp_unit.set_location necessary else pre and post teleport animation is played at the same place(arrival). Closes #3684
This commit is contained in:
parent
d0575affb4
commit
73a331b952
1 changed files with 2 additions and 0 deletions
|
@ -80,6 +80,7 @@ void teleport_unit_between(const map_location& a, const map_location& b, unit& t
|
|||
const bool a_visible = temp_unit.is_visible_to_team(a, viewing_team, false);
|
||||
const bool b_visible = temp_unit.is_visible_to_team(b, viewing_team, false);
|
||||
|
||||
temp_unit.set_location(a);
|
||||
if ( a_visible ) { // teleport
|
||||
disp.invalidate(a);
|
||||
temp_unit.set_facing(a.get_relative_dir(b));
|
||||
|
@ -93,6 +94,7 @@ void teleport_unit_between(const map_location& a, const map_location& b, unit& t
|
|||
animator.wait_for_end();
|
||||
}
|
||||
|
||||
temp_unit.set_location(b);
|
||||
if ( b_visible ) { // teleport
|
||||
disp.invalidate(b);
|
||||
temp_unit.set_facing(a.get_relative_dir(b));
|
||||
|
|
Loading…
Add table
Reference in a new issue