Healing: Display healing animation if the healer is visible but the patient is not (due to fog, shroud, nightstalk...)
This commit is contained in:
parent
56979f9153
commit
5d175eb493
2 changed files with 5 additions and 5 deletions
|
@ -343,10 +343,7 @@ void calculate_healing(int side, bool update_display)
|
|||
DBG_NG << "Just before healing animations, unit has " << healers.size() << " potential healers.\n";
|
||||
}
|
||||
|
||||
const team & viewing_team =
|
||||
resources::gameboard->teams()[display::get_singleton()->viewing_team()];
|
||||
if (!resources::controller->is_skipping_replay() && update_display &&
|
||||
patient.is_visible_to_team(viewing_team, false) )
|
||||
if (!resources::controller->is_skipping_replay() && update_display)
|
||||
{
|
||||
unit_list.emplace_front(patient, healers, healing, curing == POISON_CURE);
|
||||
}
|
||||
|
|
|
@ -780,8 +780,11 @@ void unit_healing(unit &healed, const std::vector<unit *> &healers, int healing,
|
|||
{
|
||||
game_display* disp = game_display::get_singleton();
|
||||
const map_location& healed_loc = healed.get_location();
|
||||
const bool some_healer_is_unfogged =
|
||||
(healers.end() != std::find_if_not(healers.begin(), healers.end(),
|
||||
[&](unit* h) { return disp->fogged(h->get_location()); }));
|
||||
|
||||
if(do_not_show_anims(disp) || disp->fogged(healed_loc)) {
|
||||
if(do_not_show_anims(disp) || (disp->fogged(healed_loc) && !some_healer_is_unfogged)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue