Browse files

don't show petrified units in "Damage versus:" tooltip

since we can't attack these, this information is not useful.
afaik it is quite common to have permanent "statues" in MP maps,
and extremely rare that units may be unpetrified in any core or
umc scenarios.
  • Loading branch information...
cbeck88 committed Mar 29, 2014
1 parent 254eade commit 37c138c775e0eb29ae8b520965b890ba30433a67
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/reports.cpp
@@ -770,6 +770,8 @@ static int attack_info(const attack_type &at, config &res, const unit &u, const
const team &viewing_team = (*resources::teams)[resources::screen->viewing_team()];
BOOST_FOREACH(const unit &enemy, *resources::units)
+ if (enemy.incapacitated()) //we can't attack statues so don't display them in this tooltip
+ continue;
if (!unit_team.is_enemy(enemy.side()))
const map_location &loc = enemy.get_location();

0 comments on commit 37c138c

Please sign in to comment.