Clear fog/shroud when creating units via debug mode.

This commit is contained in:
JaMiT 2013-06-29 21:19:56 -05:00
parent e99cc26bba
commit a09a312a6a
2 changed files with 10 additions and 0 deletions

View file

@ -1,6 +1,8 @@
Version 1.11.5+dev:
* Language and i18n:
* Updated translations:
* Miscellaneous and bug fixes
* Creating a unit via debug mode now clears fog/shroud around the unit.
Version 1.11.5:
* Add-ons client:

View file

@ -1046,8 +1046,16 @@ namespace { // Helpers for create_unit()
gui.invalidate_unit();
unit_display::unit_recruited(loc);
// Village capture?
if ( map.is_village(loc) )
actions::get_village(loc, created.side());
// Update fog/shroud.
actions::shroud_clearer clearer;
clearer.clear_unit(loc, created);
clearer.fire_events();
if ( add_result.first.valid() ) // In case sighted events messed with the unit.
actions::actor_sighted(*add_result.first);
}
}// Anonymous namespace