Fix minimap crash in imba mode

This commit is contained in:
dP
2021-09-30 19:09:37 +03:00
parent 2c5f48943c
commit 76d1d8ec1d

View File

@@ -608,7 +608,7 @@ static inline uint32 CM_GetSmallMapIMBAPixels(TileIndex tile, TileType t)
// return MKCOLOUR_XYYX(PC_GRASS_LAND, PC_TREES); // return MKCOLOUR_XYYX(PC_GRASS_LAND, PC_TREES);
case MP_CLEAR: case MP_CLEAR:
if (IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_DESERT)) { if (IsTileType(tile, MP_CLEAR) && (IsClearGround(tile, CLEAR_FIELDS) || IsClearGround(tile, CLEAR_DESERT))) {
const SmallMapColourScheme *cs = &_heightmap_schemes[3]; const SmallMapColourScheme *cs = &_heightmap_schemes[3];
return cs->height_colours[TileHeight(tile)]; return cs->height_colours[TileHeight(tile)];
} }