1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Revert "Fix #8064: Prohibited high construction error is sometimes shown as (undefined string)"

This reverts commit a8e46f5eec.
This commit is contained in:
Michael Steenbeek
2018-10-23 14:52:51 +02:00
parent ed7aed405b
commit 15490010e1
3 changed files with 19 additions and 23 deletions

View File

@@ -19,7 +19,6 @@
- Fix: [#8045] Crash when switching between languages.
- Fix: [#8062] In multiplayer warnings for unstable cheats are shown when disabling them.
- Fix: [#8090] Maze designs saved incorrectly.
- Fix: [#8064] Error about prohibited high construction is sometimes shown as (undefined string).
- Fix: [#8101] Title sequences window flashes after opening.
- Fix: [#8120] Crash trying to place peep spawn outside of map.
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).

View File

@@ -28,7 +28,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "3"
#define NETWORK_STREAM_VERSION "2"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static rct_peep* _pickup_peep = nullptr;

View File

@@ -1077,8 +1077,23 @@ static money32 track_place(
{
return MONEY32_UNDEFINED;
}
const uint16_t* trackFlags = (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) ? FlatTrackFlags : TrackFlags;
if (trackFlags[type] & TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT)
{
if ((originZ & 0x0F) != 8)
{
gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN;
return MONEY32_UNDEFINED;
}
}
else
{
if ((originZ & 0x0F) != 0)
{
gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN;
return MONEY32_UNDEFINED;
}
}
// If that is not the case, then perform the remaining checks
trackBlock = get_track_def_from_ride(ride, type);
@@ -1129,6 +1144,7 @@ static money32 track_place(
int32_t x = originX + offsetX;
int32_t y = originY + offsetY;
int32_t z = originZ + trackBlock->z;
trackpieceZ = z;
if (z < 16)
@@ -1167,26 +1183,7 @@ static money32 track_place(
: CREATE_CROSSING_MODE_NONE;
if (!map_can_construct_with_clear_at(
x, y, baseZ, clearanceZ, &map_place_non_scenery_clear_func, bl, flags, &cost, crossingMode))
{
return MONEY32_UNDEFINED;
}
if (trackFlags[type] & TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT)
{
if ((z & 0x0F) != 8)
{
gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN;
return MONEY32_UNDEFINED;
}
}
else
{
if ((z & 0x0F) != 0)
{
gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN;
return MONEY32_UNDEFINED;
}
}
}
// 6c53dc
@@ -2369,4 +2366,4 @@ void TrackElement::SetHighlight(bool on)
type &= ~TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
if (on)
type |= TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
}
}