mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #17542: Stalls will autorotate towards paths outside the park
This commit is contained in:
parent
f0777e5418
commit
5e8b749277
|
@ -18,6 +18,7 @@
|
|||
- Fix: [#17508] Grid doesn’t disable after setting patrol area.
|
||||
- Fix: [#17533] Missing audio when specifying ‘--rct2-data-path’.
|
||||
- Fix: [#17541] Station style not correctly saved to TD6.
|
||||
- Fix: [#17542] Stalls will autorotate towards paths outside the park.
|
||||
- Fix: [#17553] Crash when moving invention list items to empty list.
|
||||
- Fix: [#17605] Crash when opening parks which have had objects removed externally.
|
||||
|
||||
|
|
|
@ -3273,7 +3273,14 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords)
|
|||
bool keepOrientation = false;
|
||||
for (int8_t i = 0; i < NumOrthogonalDirections; i++)
|
||||
{
|
||||
pathsByDir[i] = map_get_footpath_element({ *mapCoords + CoordsDirectionDelta[i], z });
|
||||
const auto testLoc = CoordsXYZ{ *mapCoords + CoordsDirectionDelta[i], z };
|
||||
if (!map_is_location_owned(testLoc))
|
||||
{
|
||||
pathsByDir[i] = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
pathsByDir[i] = map_get_footpath_element(testLoc);
|
||||
|
||||
if (pathsByDir[i] != nullptr && (pathsByDir[i])->AsPath()->IsSloped()
|
||||
&& (pathsByDir[i])->AsPath()->GetSlopeDirection() != i)
|
||||
|
@ -3308,7 +3315,7 @@ void ride_construction_toolupdate_construct(const ScreenCoordsXY& screenCoords)
|
|||
|
||||
if (!keepOrientation)
|
||||
{
|
||||
for (int8_t i = 0; i < 4; i++)
|
||||
for (int8_t i = 0; i < NumOrthogonalDirections; i++)
|
||||
{
|
||||
if (pathsByDir[i] != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue