From 6e3b3c04dea2670c6c41fbc17e44fcf3b019c51a Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 18 Sep 2015 22:12:58 +0100 Subject: [PATCH] Enhanced viewports: Fix bug in previous fix for aqueducts in viewport map mode. Tile type tests were being performed on the wrong tile index. This fixes commit 554037422795e2b1013a22a8b4950c03cfca9489. --- src/viewport.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/viewport.cpp b/src/viewport.cpp index f283a8dfb7..431cc6637f 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1931,7 +1931,7 @@ static inline uint32 ViewportMapGetColourVegetation(const TileIndex tile, TileTy case MP_WATER: if (is_32bpp) { uint slope_index = 0; - if (IsTileType(t, MP_WATER) && GetWaterTileType(tile) != WATER_TILE_COAST) GET_SLOPE_INDEX(slope_index); + if (IsTileType(tile, MP_WATER) && GetWaterTileType(tile) != WATER_TILE_COAST) GET_SLOPE_INDEX(slope_index); return _vp_map_water_colour[slope_index]; } /* FALL THROUGH */ @@ -1969,7 +1969,7 @@ static inline uint32 ViewportMapGetColourIndustries(const TileIndex tile, const if (is_32bpp && t2 == MP_WATER) { uint slope_index = 0; - if (t != MP_INDUSTRY && IsTileType(t, MP_WATER) && GetWaterTileType(tile) != WATER_TILE_COAST) GET_SLOPE_INDEX(slope_index); ///< Ignore industry on water not shown on map. + if (t != MP_INDUSTRY && IsTileType(tile, MP_WATER) && GetWaterTileType(tile) != WATER_TILE_COAST) GET_SLOPE_INDEX(slope_index); ///< Ignore industry on water not shown on map. return _vp_map_water_colour[slope_index]; } @@ -2000,7 +2000,7 @@ static inline uint32 ViewportMapGetColourOwner(const TileIndex tile, TileType t, if (t == MP_WATER) { if (is_32bpp) { uint slope_index = 0; - if (IsTileType(t, MP_WATER) && GetWaterTileType(tile) != WATER_TILE_COAST) GET_SLOPE_INDEX(slope_index); + if (IsTileType(tile, MP_WATER) && GetWaterTileType(tile) != WATER_TILE_COAST) GET_SLOPE_INDEX(slope_index); return _vp_map_water_colour[slope_index]; } else { return PC_WATER;