Browse Source

Fix View Earth also revealing other objects such as heroes and towns

Ivan Savenko 10 months ago
parent
commit
f41873fe72
1 changed files with 4 additions and 1 deletions
  1. 4 1
      client/mapView/MapRendererContext.cpp

+ 4 - 1
client/mapView/MapRendererContext.cpp

@@ -548,7 +548,10 @@ size_t MapRendererSpellViewContext::overlayImageIndex(const int3 & coordinates)
 			return iconIndex;
 	}
 
-	return MapRendererWorldViewContext::overlayImageIndex(coordinates);
+	if (MapRendererBaseContext::isVisible(coordinates))
+		return MapRendererWorldViewContext::overlayImageIndex(coordinates);
+	else
+		return std::numeric_limits<size_t>::max();
 }
 
 MapRendererPuzzleMapContext::MapRendererPuzzleMapContext(const MapRendererContextState & viewState)