Skip to content

Commit

Permalink
Merge pull request #523 from Wedge009/bug_20299_fix
Browse files Browse the repository at this point in the history
Resolve bug #20299
  • Loading branch information
Vultraz committed Oct 27, 2015
2 parents 7e57ab0 + 3b811be commit 3884d5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -189,6 +189,7 @@ Version 1.13.1+dev:
* Fixed bug 23060: unit stat tooltips do not show.
* wmllint, wmlscope, wmlindent and wmllint-1.4 now run on Python 3
* Text boxes tab completion now lists whisperer nicks for easier answer
* Fixed cases of wrong unit type used in planning moves (bug #20299)
* Fixed hang when attempting to make a screenshot from a non-existent map via
command-line (bug #20900)
* Fixed Cancel Orders not working when loading MP game (bug #22133)
Expand Down
4 changes: 3 additions & 1 deletion src/whiteboard/manager.cpp
Expand Up @@ -713,7 +713,9 @@ void manager::create_temp_move()

if(path.size() >= 2)
{
if(!fake_unit)
// Bug #20299 demonstrates a situation where an incorrect fake/ghosted unit can be used.
// So before assuming that a pre-existing fake_unit can be re-used, check that its ID matches the unit being moved.
if(!fake_unit || fake_unit.get_unit_ptr()->id() != temp_moved_unit->id())
{
// Create temp ghost unit
fake_unit = fake_unit_ptr(unit_ptr (new unit(*temp_moved_unit)), resources::fake_units);
Expand Down

0 comments on commit 3884d5d

Please sign in to comment.