1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 00:04:43 +01:00

Fix #20083: Cannot use terrain surfaces with ID > 32

This commit is contained in:
Gymnasiast
2023-05-27 14:18:28 +02:00
parent 29bd730329
commit 0519dec33a
3 changed files with 2 additions and 13 deletions

View File

@@ -50,12 +50,6 @@ 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<TerrainSurfaceObject*>(
objManager.GetLoadedObject(ObjectType::TerrainSurface, _surfaceStyle));
@@ -68,12 +62,6 @@ GameActions::Result SurfaceSetStyleAction::Query() const
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<TerrainEdgeObject*>(objManager.GetLoadedObject(ObjectType::TerrainEdge, _edgeStyle));
if (edgeObj == nullptr)

View File

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