mirror of https://github.com/OpenRCT2/OpenRCT2.git
Prevent TI hotkey from setting wall slope for non-slopeable objects (#21635)
This commit is contained in:
parent
51b0143b2d
commit
693c422cd4
|
@ -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)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <openrct2/interface/Screenshot.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/network/network.h>
|
||||
#include <openrct2/object/WallSceneryEntry.h>
|
||||
#include <openrct2/platform/Platform.h>
|
||||
#include <openrct2/ride/Track.h>
|
||||
#include <openrct2/ride/TrackPaint.h>
|
||||
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue