fixed bug where a unit with greater than its maximum hitpoints...

...couldn't be cured of poison
This commit is contained in:
Dave White 2005-01-30 03:46:48 +00:00
parent 7b8329d6be
commit 75bbd9af64

View file

@ -981,7 +981,7 @@ bool will_heal(const gamemap::location& loc, int side, const std::vector<team>&
get_adjacent_tiles(loc,adjacent);
for(int n = 0; n != 6; ++n) {
const unit_map::const_iterator u = units.find(adjacent[n]);
if(u != units.end() && u->second.hitpoints() < u->second.max_hitpoints()) {
if(u != units.end() && (u->second.hitpoints() < u->second.max_hitpoints() || u->second.poisoned())) {
const int unit_side = u->second.side();
//the healer won't heal an ally if there is a wounded unit on the same