Minimap: fix village markers drawing over fog/shroud

Looks like was a regression from 1135077d16.

We didn't need a shrouded check before since the terrain at issue was set to VOID_TERRAIN
if the hex was shrouded, meaning the is-village check would always fail. When we switched
to iterating over the village list directly we made it necessary to check each village loc
for shroud or fog before drawing the indicator.
This commit is contained in:
Charles Dang 2024-02-21 01:58:35 -05:00
parent 2be50eac14
commit b39d5d53d7

View file

@ -203,8 +203,9 @@ std::function<rect(rect)> prep_minimap_for_rendering(
//
if(preferences_minimap_draw_villages) {
for(const map_location& loc : map.villages()) {
// Check needed for mp create dialog
const int side_num = resources::gameboard ? resources::gameboard->village_owner(loc) : 0;
if(is_blindfolded || (vw && (vw->shrouded(loc) || vw->fogged(loc)))) {
continue;
}
color_t col(255, 255, 255);
@ -214,7 +215,10 @@ std::function<rect(rect)> prep_minimap_for_rendering(
col = iter->second.min();
}
if(!fogged(loc) && side_num > 0) {
// Check needed for mp create dialog
const int side_num = resources::gameboard ? resources::gameboard->village_owner(loc) : 0;
if(side_num > 0) {
if(preferences_minimap_unit_coding || !vw) {
col = team::get_minimap_color(side_num);
} else {