slightly reworked 2009-04-07T20:40:30Z!terraninfo@terraninfo.net,

...after consultation with boucman, to play recruitment animation
without the leader, if there is no good ptr to leader.
This commit is contained in:
Iurii Chernyi 2009-04-07 21:59:32 +00:00
parent 99f4bbd384
commit 16f98b2b59

View file

@ -191,7 +191,13 @@ std::string recruit_unit(const gamemap& map, const int side, unit_map& units,
}
const unit_map::iterator new_unit_itor = units.find(recruit_location);
if(new_unit_itor != units.end()) new_unit_itor->second.set_hidden(false);
if(show && u.valid())unit_display::unit_recruited(recruit_location,u->first);
if (show) {
if (u.valid()) {
unit_display::unit_recruited(recruit_location,u->first);
} else {
unit_display::unit_recruited(recruit_location);
}
}
if (is_recall)
{
LOG_NG << "firing recall event\n";