mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 17:42:29 +01:00
Use ride->GetRideTypeDescriptor() in Maze related game actions
This commit is contained in:
@@ -78,7 +78,9 @@ GameActions::Result MazePlaceTrackAction::Query() const
|
|||||||
{
|
{
|
||||||
heightDifference /= COORDS_Z_PER_TINY_Z;
|
heightDifference /= COORDS_Z_PER_TINY_Z;
|
||||||
|
|
||||||
if (heightDifference > GetRideTypeDescriptor(RIDE_TYPE_MAZE).Heights.MaxHeight)
|
auto* ride = get_ride(_rideIndex);
|
||||||
|
const auto& rtd = ride->GetRideTypeDescriptor();
|
||||||
|
if (heightDifference > rtd.Heights.MaxHeight)
|
||||||
{
|
{
|
||||||
res.Error = GameActions::Status::TooHigh;
|
res.Error = GameActions::Status::TooHigh;
|
||||||
res.ErrorMessage = STR_TOO_HIGH_FOR_SUPPORTS;
|
res.ErrorMessage = STR_TOO_HIGH_FOR_SUPPORTS;
|
||||||
|
|||||||
@@ -89,7 +89,9 @@ GameActions::Result MazeSetTrackAction::Query() const
|
|||||||
{
|
{
|
||||||
heightDifference /= COORDS_Z_PER_TINY_Z;
|
heightDifference /= COORDS_Z_PER_TINY_Z;
|
||||||
|
|
||||||
if (heightDifference > GetRideTypeDescriptor(RIDE_TYPE_MAZE).Heights.MaxHeight)
|
auto* ride = get_ride(_rideIndex);
|
||||||
|
const auto& rtd = ride->GetRideTypeDescriptor();
|
||||||
|
if (heightDifference > rtd.Heights.MaxHeight)
|
||||||
{
|
{
|
||||||
res.Error = GameActions::Status::TooHigh;
|
res.Error = GameActions::Status::TooHigh;
|
||||||
res.ErrorMessage = STR_TOO_HIGH_FOR_SUPPORTS;
|
res.ErrorMessage = STR_TOO_HIGH_FOR_SUPPORTS;
|
||||||
|
|||||||
Reference in New Issue
Block a user