Invisible units not drawn in enemy turn

(still viewed in minimap, and when mouse goes over them)
This commit is contained in:
uid67456 2004-01-29 22:18:15 +00:00
parent 5b8cc48ae0
commit 2cd5c041ba

View file

@ -1302,7 +1302,11 @@ void display::draw_tile(int x, int y, SDL_Surface* unit_image_override,
draw_footstep(loc,xpos-xsrc,ypos-ysrc);
}
if(unit_image == NULL || energy_image == NULL || fogged(x,y))
if(unit_image == NULL || energy_image == NULL || fogged(x,y) ||
(teams_[currentTeam_].is_enemy(it->second.side()) &&
it->second.invisible(map_.underlying_terrain(map_[x][y]),
status_.get_time_of_day().lawful_bonus,loc,
units_,teams_)))
return;
if(loc != hiddenUnit_) {