Simpler interface for unit_display::unit_healing().
This commit is contained in:
parent
127b8ba098
commit
5cf5e73cd2
4 changed files with 6 additions and 9 deletions
|
@ -231,8 +231,7 @@ void calculate_healing(int side, bool update_display)
|
|||
unit_healing_struct uhs = l.front();
|
||||
l.pop_front();
|
||||
|
||||
unit_display::unit_healing(*uhs.healed, uhs.healed->get_location(),
|
||||
uhs.healers, uhs.healing);
|
||||
unit_display::unit_healing(*uhs.healed, uhs.healers, uhs.healing);
|
||||
|
||||
/* next unit to be healed is nearest from uhs left in list l */
|
||||
while (!l.empty()) {
|
||||
|
@ -254,8 +253,7 @@ void calculate_healing(int side, bool update_display)
|
|||
uhs = *nearest;
|
||||
l.erase(nearest);
|
||||
|
||||
unit_display::unit_healing(*uhs.healed, uhs.healed->get_location(),
|
||||
uhs.healers, uhs.healing);
|
||||
unit_display::unit_healing(*uhs.healed, uhs.healers, uhs.healing);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2640,7 +2640,7 @@ WML_HANDLER_FUNCTION(heal_unit, event_info, cfg)
|
|||
resources::gamedata->get_variable("heal_amount") = heal_amount;
|
||||
}
|
||||
|
||||
if(animate) unit_display::unit_healing(*u, u->get_location(), healers, heal_amount);
|
||||
if(animate) unit_display::unit_healing(*u, healers, heal_amount);
|
||||
if(only_unit_at_loc1) return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -610,10 +610,10 @@ void unit_recruited(const map_location& loc,const map_location& leader_loc)
|
|||
if (loc==disp->mouseover_hex()) disp->invalidate_unit();
|
||||
}
|
||||
|
||||
void unit_healing(unit &healed, const map_location &healed_loc,
|
||||
const std::vector<unit *> &healers, int healing)
|
||||
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();
|
||||
if(!disp || disp->video().update_locked() || disp->video().faked() || disp->fogged(healed_loc)) return;
|
||||
if(healing==0) return;
|
||||
// This is all the pretty stuff.
|
||||
|
|
|
@ -116,8 +116,7 @@ void unit_recruited(const map_location& loc,
|
|||
/**
|
||||
* This will use a poisoning anim if healing<0.
|
||||
*/
|
||||
void unit_healing(unit &healed, const map_location &healed_loc,
|
||||
const std::vector<unit *> &healers, int healing);
|
||||
void unit_healing(unit &healed, const std::vector<unit *> &healers, int healing);
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue