diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 9b8a275719..1541297003 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -7,6 +7,7 @@ - Fix: [#910] Extra viewport does not preserve the location when rotating. - Fix: [#21434] Number of guests overflows in objective text. - Fix: [#21543] Crash with creating a TrackIterator with invalid arguments. +- Fix: [#21635] Tile inspector hotkey can set wall slope for non-slopeable objects. - Fix: [#21641] Crash when creating track iterator from an invalid tile element. 0.4.9 (2024-03-02) diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index d589537f58..983f6746df 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -527,6 +528,12 @@ static void ShortcutToggleWallSlope() return; } + // Ensure a wall can be built on a slope + if (tileElement->AsWall()->GetEntry()->flags & WALL_SCENERY_CANT_BUILD_ON_SLOPE) + { + return; + } + int32_t currSlopeValue = tileElement->AsWall()->GetSlope(); int32_t newSlopeValue = (currSlopeValue + 1) % 3;