diff --git a/distribution/changelog.txt b/distribution/changelog.txt index c871a0ff0c..b91dc45063 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -10,6 +10,7 @@ - Improved: [#21423] Add mechanism to allow building partly underground. - Change: [#21453] Reintroduce lost RCT1 Jet skis colour presets to the boat hire. - Fix: [#18963] Research table in parks from Loopy Landscapes is imported incorrectly. +- Fix: [#20164] Grass and Rock terrain objects cannot be de-selected. - Fix: [#20907] RCT1/AA scenarios use the 4-across train for the Inverted Roller Coaster. - Fix: [#21208] Error message will stay open only for a brief moment when the game has been running a while. - Fix: [#21220] When creating a new park from a SC4 file, the localised park name is not applied. diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index ec548ca77b..f7e185f66c 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -80,8 +80,8 @@ public: gLandToolTerrainEdge = OBJECT_ENTRY_INDEX_NULL; gLandMountainMode = false; gLandPaintMode = false; - _selectedFloorTexture = 0; - _selectedWallTexture = 0; + _selectedFloorTexture = LandTool::GetSurfaceStyleFromDropdownIndex(0); + _selectedWallTexture = LandTool::GetEdgeStyleFromDropdownIndex(0); gLandToolRaiseCost = kMoney64Undefined; gLandToolLowerCost = kMoney64Undefined; } diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index dfcb933b3b..4bf4c6c66f 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -298,9 +298,9 @@ static ScreenCoordsXY Translate3DTo2D(int32_t rotation, const CoordsXY& pos); void TileElementIteratorBegin(TileElementIterator* it) { - it->x = 0; - it->y = 0; - it->element = MapGetFirstElementAt(TileCoordsXY{ 0, 0 }); + it->x = 1; + it->y = 1; + it->element = MapGetFirstElementAt(TileCoordsXY{ 1, 1 }); } int32_t TileElementIteratorNext(TileElementIterator* it) @@ -317,16 +317,17 @@ int32_t TileElementIteratorNext(TileElementIterator* it) return 1; } - if (it->y < (MAXIMUM_MAP_SIZE_TECHNICAL - 1)) + auto& gameState = GetGameState(); + if (it->y < (gameState.MapSize.y - 2)) { it->y++; it->element = MapGetFirstElementAt(TileCoordsXY{ it->x, it->y }); return 1; } - if (it->x < (MAXIMUM_MAP_SIZE_TECHNICAL - 1)) + if (it->x < (gameState.MapSize.x - 2)) { - it->y = 0; + it->y = 1; it->x++; it->element = MapGetFirstElementAt(TileCoordsXY{ it->x, it->y }); return 1;