Merge pull request #543 from Wedge009/bug_20299_fix_(1.12)
Resolve incorrect fake unit types (bug #20299) [1.12]
This commit is contained in:
commit
e0594b2b44
2 changed files with 4 additions and 1 deletions
|
@ -56,6 +56,7 @@ Version 1.12.4+dev:
|
|||
* Fixed broken Oasis terrain help entry (bug #23023)
|
||||
* Fixed hang when attempting to make a screenshot from a non-existent map via
|
||||
command-line (bug #20900)
|
||||
* Fixed cases of wrong unit type used in planning moves (bug #20299)
|
||||
|
||||
Version 1.12.4:
|
||||
* Security fixes:
|
||||
|
|
|
@ -706,7 +706,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->id() != temp_moved_unit->id())
|
||||
{
|
||||
// Create temp ghost unit
|
||||
fake_unit.reset(new game_display::fake_unit(*temp_moved_unit));
|
||||
|
|
Loading…
Add table
Reference in a new issue