Don't let petrified units reveal ambushers

This commit is contained in:
Alexander van Gessel 2013-04-04 01:09:29 +02:00
parent 1a3aefd3e0
commit cfb64ea8c8
2 changed files with 2 additions and 1 deletions

View file

@ -7,6 +7,7 @@ Version 1.11.2+dev:
* Miscellaneous and bug fixes
* Switched to git version control. Hosting moved to SourceForge
* Improved: Autorevision based revision numbers in CMake.
* Don't let petrified units reveal ambushers
Version 1.11.2:
* Add-ons client:

View file

@ -2770,7 +2770,7 @@ bool unit::invisible(const map_location& loc, bool see_all) const
BOOST_FOREACH(const unit &u, *resources::units)
{
const map_location &u_loc = u.get_location();
if (teams[side_-1].is_enemy(u.side()) && tiles_adjacent(loc, u_loc)) {
if (teams[side_-1].is_enemy(u.side()) && !u.incapacitated() && tiles_adjacent(loc, u_loc)) {
// Enemy spotted in adjacent tiles, check if we can see him.
// Watch out to call invisible with see_all=true to avoid infinite recursive calls!
if(see_all) {