From 228a8573e2b69bf065d0f1d9d35f511f6dd7a023 Mon Sep 17 00:00:00 2001 From: HouseholdVTuber <112344059+HouseholdVTuber@users.noreply.github.com> Date: Tue, 6 Dec 2022 21:06:06 -0500 Subject: [PATCH] Fix #18364: No Too High! or Too Low! error messages when attempting to raise/lower land beyond the limits --- contributors.md | 4 +++- src/openrct2/actions/LandSetHeightAction.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/contributors.md b/contributors.md index 1ad5a8ae8a..92818ab9b2 100644 --- a/contributors.md +++ b/contributors.md @@ -203,6 +203,8 @@ The following people are not part of the development team, but have been contrib * Raymond Zhao (rzhao271) * Xixiang Chen (jacknull1991) * (ReticulatingSplines) +* Conrad Cash (HouseholdVTuber) + ## Toolchain * (Balletie) - macOS @@ -269,4 +271,4 @@ Representation by Jacqui Lyons at Marjacq Ltd. Thanks to: Peter James Adcock, Joe Booth, and John Wardley -Licensed to Infogrames Interactive Inc. +Licensed to Infogrames Interactive Inc. \ No newline at end of file diff --git a/src/openrct2/actions/LandSetHeightAction.cpp b/src/openrct2/actions/LandSetHeightAction.cpp index 00909f26a0..d016538d78 100644 --- a/src/openrct2/actions/LandSetHeightAction.cpp +++ b/src/openrct2/actions/LandSetHeightAction.cpp @@ -52,10 +52,10 @@ GameActions::Result LandSetHeightAction::Query() const return GameActions::Result(GameActions::Status::Disallowed, STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY, STR_NONE); } - StringId errorTitle = CheckParameters(); - if (errorTitle != STR_NONE) + StringId errorMessage = CheckParameters(); + if (errorMessage != STR_NONE) { - return GameActions::Result(GameActions::Status::Disallowed, errorTitle, STR_NONE); + return GameActions::Result(GameActions::Status::Disallowed, STR_NONE, errorMessage); } if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) @@ -86,10 +86,10 @@ GameActions::Result LandSetHeightAction::Query() const // Check for ride support limits if (!gCheatsDisableSupportLimits) { - errorTitle = CheckRideSupports(); - if (errorTitle != STR_NONE) + errorMessage = CheckRideSupports(); + if (errorMessage != STR_NONE) { - return GameActions::Result(GameActions::Status::Disallowed, errorTitle, STR_NONE); + return GameActions::Result(GameActions::Status::Disallowed, STR_NONE, errorMessage); } }