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:
parent
2be50eac14
commit
b39d5d53d7
1 changed files with 7 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue