Explorar o código

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

Ivan Savenko hai 11 meses
pai
achega
f41873fe72
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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)