Invisible enemy units are not displayed in side panel...

...when mouse is over them (but still disrupt paths, and clear panel)
This commit is contained in:
uid67456 2004-01-29 23:52:45 +00:00
parent ce2d4cf654
commit 44fa410ee5

View file

@ -31,17 +31,25 @@ report generate_report(TYPE type, const gamemap& map, const unit_map& units,
const gamemap::location& loc, const gamemap::location& mouseover,
const gamestatus& status, const std::string* format_string)
{
unit_map::const_iterator u = units.end();
unit_map::const_iterator u;
if(int(type) >= int(UNIT_REPORTS_BEGIN) && int(type) < int(UNIT_REPORTS_END) || type == POSITION) {
if(!current_team.fogged(mouseover.x,mouseover.y)) {
u = units.find(mouseover);
u = units.find(mouseover);
if(current_team.fogged(mouseover.x,mouseover.y) ||
(current_team.is_enemy(u->second.side()) &&
u->second.invisible(map[mouseover.x][mouseover.y],
status.get_time_of_day().lawful_bonus,mouseover,units,teams))) {
u = units.end();
}
if(u == units.end()) {
if(!current_team.fogged(loc.x,loc.y)) {
u = units.find(loc);
u = units.find(loc);
if(current_team.fogged(loc.x,loc.y) ||
(current_team.is_enemy(u->second.side()) &&
u->second.invisible(map[loc.x][loc.y],
status.get_time_of_day().lawful_bonus,loc,units,teams))) {
u = units.end();
}
if(u == units.end() && type != POSITION) {