mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use ride->GetRideTypeDescriptor() in Maze related game actions
This commit is contained in:
parent
3acec45f97
commit
9971ca15ad
|
@ -78,7 +78,9 @@ GameActions::Result MazePlaceTrackAction::Query() const
|
|||
{
|
||||
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.ErrorMessage = STR_TOO_HIGH_FOR_SUPPORTS;
|
||||
|
|
|
@ -89,7 +89,9 @@ GameActions::Result MazeSetTrackAction::Query() const
|
|||
{
|
||||
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.ErrorMessage = STR_TOO_HIGH_FOR_SUPPORTS;
|
||||
|
|
Loading…
Reference in New Issue