1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

Prevent TI hotkey from setting wall slope for non-slopeable objects (#21635)

This commit is contained in:
Andrew
2024-03-22 06:20:48 -04:00
committed by GitHub
parent 51b0143b2d
commit 693c422cd4
2 changed files with 8 additions and 0 deletions

View File

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