Some changes in the bad file, moved and working fine :)
This commit is contained in:
parent
44fa410ee5
commit
e2b170d078
2 changed files with 11 additions and 14 deletions
|
@ -583,7 +583,12 @@ void display::draw_sidebar()
|
|||
i = units_.find(selectedHex_);
|
||||
}
|
||||
|
||||
if(i != units_.end() && !fogged(i->first.x,i->first.y)) {
|
||||
//if unit is not fogged and not an invisible enemy
|
||||
if(i != units_.end() && !fogged(i->first.x,i->first.y) &&
|
||||
(!teams_[viewing_team()].is_enemy(i->second.side()) ||
|
||||
!i->second.invisible(map_[i->first.x][i->first.y],
|
||||
status_.get_time_of_day().lawful_bonus,
|
||||
i->first,units_,teams_))) {
|
||||
for(size_t r = reports::UNIT_REPORTS_BEGIN; r != reports::UNIT_REPORTS_END; ++r) {
|
||||
draw_report(reports::TYPE(r));
|
||||
}
|
||||
|
|
|
@ -31,25 +31,17 @@ 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;
|
||||
unit_map::const_iterator u = units.end();
|
||||
|
||||
if(int(type) >= int(UNIT_REPORTS_BEGIN) && int(type) < int(UNIT_REPORTS_END) || type == POSITION) {
|
||||
|
||||
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(!current_team.fogged(mouseover.x,mouseover.y)) {
|
||||
u = units.find(mouseover);
|
||||
}
|
||||
|
||||
if(u == units.end()) {
|
||||
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(!current_team.fogged(loc.x,loc.y)) {
|
||||
u = units.find(loc);
|
||||
}
|
||||
|
||||
if(u == units.end() && type != POSITION) {
|
||||
|
|
Loading…
Add table
Reference in a new issue