Skip to content

Commit

Permalink
Fix #1516: units created with [move_units_fake] disappear between steps
Browse files Browse the repository at this point in the history
The code accidentally added a wrong fake_unit_ptr to the fake unit manager.
The wrong pointer was removed from the manager immediately after being
added, and therefore only the other fake_unit_ptr, created by unit_mover,
remained. Thus, moving fake units were drawn, but stationary ones weren't.
  • Loading branch information
jyrkive committed Feb 17, 2018
1 parent c2bc40f commit 551508b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog
Expand Up @@ -4,6 +4,9 @@ Version 1.13.11+dev:
* Fixed a few cases of data not displaying in the MP Join Game screen.
* Fixed required addon names not displaying properly when joining an
MP game.
* WML engine:
* Fixed units shown with [move_units_fake] disappearing between steps
(bug #1516).
* Miscellaneous and bug fixes:
* Fixed standing animation toggle not taking immediate effect (bug
#1653).
Expand Down
2 changes: 1 addition & 1 deletion src/game_events/action_wml.cpp
Expand Up @@ -426,7 +426,7 @@ WML_HANDLER_FUNCTION(move_units_fake,, cfg)
DBG_NG << "Path " << paths.size() - 1 << " has length " << paths.back().size() << '\n';

u->set_location(paths.back().front());
u.place_on_fake_unit_manager(resources::fake_units);
units.back().place_on_fake_unit_manager(resources::fake_units);
}

LOG_NG << "Units placed, longest path is " << longest_path << " long\n";
Expand Down

0 comments on commit 551508b

Please sign in to comment.