src/viewport.cpp
changeset 9302 4aa3c4a44b16
parent 9294 5cd9e0da420f
child 10164 3ff9e65f3d49
--- a/src/viewport.cpp	Thu Apr 03 16:16:52 2008 +0000
+++ b/src/viewport.cpp	Thu Apr 03 19:55:40 2008 +0000
@@ -1230,8 +1230,8 @@
 	const Sign *si;
 	int left, top, right, bottom;
 
-	if (!HasBit(_display_opt, DO_SHOW_SIGNS))
-		return;
+	/* Signs are turned off or are invisible */
+	if (!HasBit(_display_opt, DO_SHOW_SIGNS) || IsInvisibilitySet(TO_SIGNS)) return;
 
 	left = dpi->left;
 	top = dpi->top;
@@ -1495,6 +1495,12 @@
 		uint16 colour;
 
 		if (ss->width != 0) {
+			/* Do not draw signs nor station names if they are set invisible */
+			if (IsInvisibilitySet(TO_SIGNS) && ss->string != STR_2806) {
+				ss = ss->next;
+				continue;
+			}
+
 			int x = UnScaleByZoom(ss->x, zoom) - 1;
 			int y = UnScaleByZoom(ss->y, zoom) - 1;
 			int bottom = y + 11;
@@ -1958,7 +1964,8 @@
 {
 	const Sign *si;
 
-	if (!HasBit(_display_opt, DO_SHOW_SIGNS) || _current_player == PLAYER_SPECTATOR) return false;
+	/* Signs are turned off, or they are transparent and invisibility is ON, or player is a spectator */
+	if (!HasBit(_display_opt, DO_SHOW_SIGNS) || IsInvisibilitySet(TO_SIGNS) || _current_player == PLAYER_SPECTATOR) return false;
 
 	switch (vp->zoom) {
 		case ZOOM_LVL_NORMAL: