diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 0a16bda8bf..3a51869eeb 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -6,6 +6,7 @@ - Change: [#20110] Fix a few RCT1 build height parity discrepancies. - Fix: [#6152] Camera and UI are no longer locked at 40 Hz, providing a smoother experience. - Fix: [#19823] Parkobj: disallow overriding objects of different object types. +- Fix: [#20083] Cannot use terrain surfaces with ID > 32 and terrain edges with ID > 16. - Fix: [#20111] All coaster types can access the new diagonal slope pieces. - Fix: [#20155] Fairground organ style 2 shows up as regular music, rather than for the merry-go-round. - Fix: [#20260] Ride locks up when inspecting/fixing staff member is fired. diff --git a/src/openrct2/actions/BannerPlaceAction.cpp b/src/openrct2/actions/BannerPlaceAction.cpp index d0d7a8d53a..f81d598993 100644 --- a/src/openrct2/actions/BannerPlaceAction.cpp +++ b/src/openrct2/actions/BannerPlaceAction.cpp @@ -99,7 +99,8 @@ GameActions::Result BannerPlaceAction::Query() const if (bannerEntry == nullptr) { LOG_ERROR("Invalid banner object type. bannerType = ", _bannerType); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } res.Cost = bannerEntry->price; @@ -126,7 +127,8 @@ GameActions::Result BannerPlaceAction::Execute() const if (bannerEntry == nullptr) { LOG_ERROR("Invalid banner object type. bannerType = ", _bannerType); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } auto banner = CreateBanner(); diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index fc3f78000a..1664456bf0 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -97,7 +97,8 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const auto* pathAdditionEntry = OpenRCT2::ObjectManager::GetObjectEntry(_entryIndex); if (pathAdditionEntry == nullptr) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } uint16_t sceneryFlags = pathAdditionEntry->flags; @@ -164,7 +165,8 @@ GameActions::Result FootpathAdditionPlaceAction::Execute() const auto* pathAdditionEntry = OpenRCT2::ObjectManager::GetObjectEntry(_entryIndex); if (pathAdditionEntry == nullptr) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } res.Cost = pathAdditionEntry->price; diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.cpp b/src/openrct2/actions/LargeSceneryPlaceAction.cpp index f20732993d..c196d2e397 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.cpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.cpp @@ -85,7 +85,8 @@ GameActions::Result LargeSceneryPlaceAction::Query() const if (sceneryEntry == nullptr) { LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } uint32_t totalNumTiles = GetTotalNumTiles(sceneryEntry->tiles); @@ -197,7 +198,8 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const if (sceneryEntry == nullptr) { LOG_ERROR("Invalid game command for scenery placement, sceneryType = %u", _sceneryType); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } if (sceneryEntry->tiles == nullptr) diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/LargeSceneryRemoveAction.cpp index 3d0edbe080..1e230e6a7b 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/LargeSceneryRemoveAction.cpp @@ -72,7 +72,7 @@ GameActions::Result LargeSceneryRemoveAction::Query() const auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry(); // If we have a bugged scenery entry, do not touch the tile element. if (sceneryEntry == nullptr) - return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_NONE); + return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REMOVE_THIS, STR_UNKNOWN_OBJECT_TYPE); auto rotatedOffsets = CoordsXYZ{ CoordsXY{ sceneryEntry->tiles[_tileIndex].x_offset, sceneryEntry->tiles[_tileIndex].y_offset }.Rotate(_loc.direction), diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index eff9a6507a..b3ec046f05 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -100,7 +100,8 @@ GameActions::Result RideCreateAction::Query() const const auto* rideEntry = GetRideEntryByIndex(rideEntryIndex); if (rideEntry == nullptr) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_CREATE_NEW_RIDE_ATTRACTION, STR_UNKNOWN_OBJECT_TYPE); } const auto* presetList = rideEntry->vehicle_preset_list; diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.cpp b/src/openrct2/actions/SmallSceneryPlaceAction.cpp index fc41ed17f0..3f084cfdd0 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.cpp +++ b/src/openrct2/actions/SmallSceneryPlaceAction.cpp @@ -116,7 +116,8 @@ GameActions::Result SmallSceneryPlaceAction::Query() const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (sceneryEntry == nullptr) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } auto quadrant = _quadrant; @@ -308,7 +309,8 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const auto* sceneryEntry = OpenRCT2::ObjectManager::GetObjectEntry(_sceneryType); if (sceneryEntry == nullptr) { - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } auto quadrant = _quadrant; diff --git a/src/openrct2/actions/SurfaceSetStyleAction.cpp b/src/openrct2/actions/SurfaceSetStyleAction.cpp index 47e67d0a31..217667c29e 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.cpp +++ b/src/openrct2/actions/SurfaceSetStyleAction.cpp @@ -50,36 +50,26 @@ GameActions::Result SurfaceSetStyleAction::Query() const auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); if (_surfaceStyle != OBJECT_ENTRY_INDEX_NULL) { - if (_surfaceStyle > 0x1F) - { - LOG_ERROR("Invalid surface style."); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); - } - const auto surfaceObj = static_cast( objManager.GetLoadedObject(ObjectType::TerrainSurface, _surfaceStyle)); if (surfaceObj == nullptr) { LOG_ERROR("Invalid surface style."); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_UNKNOWN_OBJECT_TYPE); } } if (_edgeStyle != OBJECT_ENTRY_INDEX_NULL) { - if (_edgeStyle > 0xF) - { - LOG_ERROR("Invalid edge style."); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); - } - const auto edgeObj = static_cast(objManager.GetLoadedObject(ObjectType::TerrainEdge, _edgeStyle)); if (edgeObj == nullptr) { LOG_ERROR("Invalid edge style."); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_NONE); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_CHANGE_LAND_TYPE, STR_UNKNOWN_OBJECT_TYPE); } } diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index f333d66724..c9960a7f7b 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -79,7 +79,7 @@ GameActions::Result TrackPlaceAction::Query() const { LOG_WARNING("Invalid ride subtype for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); return GameActions::Result( - GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); + GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } if (!DirectionValid(_origin.direction)) @@ -422,7 +422,7 @@ GameActions::Result TrackPlaceAction::Execute() const { LOG_WARNING("Invalid ride subtype for track placement, rideIndex = %d", _rideIndex.ToUnderlying()); return GameActions::Result( - GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NONE); + GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } auto res = GameActions::Result(); diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 4dd23dcb79..6e59bc6155 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -222,7 +222,7 @@ GameActions::Result WallPlaceAction::Query() const if (wallEntry == nullptr) { LOG_ERROR("Wall Type not found %d", _wallType); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); + return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } if (wallEntry->scrolling_mode != SCROLLING_MODE_NONE) @@ -312,7 +312,7 @@ GameActions::Result WallPlaceAction::Execute() const if (wallEntry == nullptr) { LOG_ERROR("Wall Type not found %d", _wallType); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_NONE); + return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_UNKNOWN_OBJECT_TYPE); } uint8_t clearanceHeight = targetHeight / COORDS_Z_STEP; diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index d06c2da9db..740b9a7239 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -43,7 +43,7 @@ // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "5" +#define NETWORK_STREAM_VERSION "6" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION