mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #8064: Prohibited high construction error is sometimes shown as (undefined string)
This commit is contained in:
parent
2802b9a5d3
commit
a8e46f5eec
|
@ -19,6 +19,7 @@
|
||||||
- Fix: [#8045] Crash when switching between languages.
|
- Fix: [#8045] Crash when switching between languages.
|
||||||
- Fix: [#8062] In multiplayer warnings for unstable cheats are shown when disabling them.
|
- Fix: [#8062] In multiplayer warnings for unstable cheats are shown when disabling them.
|
||||||
- Fix: [#8090] Maze designs saved incorrectly.
|
- 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: [#8101] Title sequences window flashes after opening.
|
||||||
- Fix: [#8120] Crash trying to place peep spawn outside of map.
|
- Fix: [#8120] Crash trying to place peep spawn outside of map.
|
||||||
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).
|
- Improved: [#2940] Allow mouse-dragging to set patrol area (Singleplayer only).
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
// This string specifies which version of network stream current build uses.
|
// This string specifies which version of network stream current build uses.
|
||||||
// It is used for making sure only compatible builds get connected, even within
|
// It is used for making sure only compatible builds get connected, even within
|
||||||
// single OpenRCT2 version.
|
// single OpenRCT2 version.
|
||||||
#define NETWORK_STREAM_VERSION "2"
|
#define NETWORK_STREAM_VERSION "3"
|
||||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||||
|
|
||||||
static rct_peep* _pickup_peep = nullptr;
|
static rct_peep* _pickup_peep = nullptr;
|
||||||
|
|
|
@ -1077,23 +1077,8 @@ static money32 track_place(
|
||||||
{
|
{
|
||||||
return MONEY32_UNDEFINED;
|
return MONEY32_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint16_t* trackFlags = (rideTypeFlags & RIDE_TYPE_FLAG_FLAT_RIDE) ? FlatTrackFlags : TrackFlags;
|
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
|
// If that is not the case, then perform the remaining checks
|
||||||
trackBlock = get_track_def_from_ride(ride, type);
|
trackBlock = get_track_def_from_ride(ride, type);
|
||||||
|
@ -1144,7 +1129,6 @@ static money32 track_place(
|
||||||
int32_t x = originX + offsetX;
|
int32_t x = originX + offsetX;
|
||||||
int32_t y = originY + offsetY;
|
int32_t y = originY + offsetY;
|
||||||
int32_t z = originZ + trackBlock->z;
|
int32_t z = originZ + trackBlock->z;
|
||||||
|
|
||||||
trackpieceZ = z;
|
trackpieceZ = z;
|
||||||
|
|
||||||
if (z < 16)
|
if (z < 16)
|
||||||
|
@ -1183,7 +1167,26 @@ static money32 track_place(
|
||||||
: CREATE_CROSSING_MODE_NONE;
|
: CREATE_CROSSING_MODE_NONE;
|
||||||
if (!map_can_construct_with_clear_at(
|
if (!map_can_construct_with_clear_at(
|
||||||
x, y, baseZ, clearanceZ, &map_place_non_scenery_clear_func, bl, flags, &cost, crossingMode))
|
x, y, baseZ, clearanceZ, &map_place_non_scenery_clear_func, bl, flags, &cost, crossingMode))
|
||||||
|
{
|
||||||
return MONEY32_UNDEFINED;
|
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
|
// 6c53dc
|
||||||
|
@ -2366,4 +2369,4 @@ void TrackElement::SetHighlight(bool on)
|
||||||
type &= ~TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
type &= ~TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
||||||
if (on)
|
if (on)
|
||||||
type |= TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
type |= TILE_ELEMENT_TYPE_FLAG_HIGHLIGHT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue