1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-08 22:26:51 +02:00

Merge pull request #4997 from IvanSavenko/fix_view_earth

Fix View Earth also revealing other objects such as heroes and towns
This commit is contained in:
Ivan Savenko
2024-11-29 15:38:12 +02:00
committed by GitHub

View File

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