Make all labels visible in the editor.

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.
This commit is contained in:
JaMiT 2014-03-01 13:35:30 -06:00
parent 9dca522a78
commit 2fb13f89da

View file

@ -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() )