1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00

Fix #20164: Grass and Rock terrain objects cannot be de-selected (#21399)

This commit is contained in:
Katherine Norton
2024-03-01 18:33:45 -06:00
committed by GitHub
parent bb743f0c88
commit 534ba4f339
3 changed files with 10 additions and 8 deletions

View File

@@ -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.

View File

@@ -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;
}

View File

@@ -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;