Skip to content

Commit

Permalink
Make all labels visible in the editor.
Browse files Browse the repository at this point in the history
I don't know why the earlier logic was so convoluted. Someone tried
to mash so many conditions in one line that apparently I missed the
intent earlier. I'm no longer trying to match the earlier logic, but
instead just trying to get the conditions right.

I really don't know how this will interact with the map editor's
label tool, because that tool is disabled for me and the screen
gives me no indication of how to enable it. But this does appear
to fix bug #21732 without messing up multiplayer.
  • Loading branch information
Ja-MiT committed Mar 1, 2014
1 parent 9dca522 commit 2fb13f8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/map_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,12 @@ bool terrain_label::viewable() const
if ( !parent_->enabled() )
return false;

// Observers are not privvy to team labels. (Unless this is the map editor,
// in which we want location labels initially visible; this is implied by
// case team::nteams() being zero.)
bool can_see_team_labels = (!is_observer() || !team::nteams());
// In the editor, all labels are viewable.
if ( team::nteams() == 0 )
return true;

// Observers are not privvy to team labels.
const bool can_see_team_labels = !is_observer();

// Global labels are shown unless covered by a team label.
if ( team_name_.empty() )
Expand Down

0 comments on commit 2fb13f8

Please sign in to comment.