Implement review requests

This commit is contained in:
Gymnasiast 2020-01-01 23:03:41 +01:00
parent 0d09a645fc
commit 5c0a62c31a
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 4 additions and 7 deletions

View File

@ -3615,13 +3615,12 @@ void ride_construction_toolupdate_construct(ScreenCoordsXY screenCoords)
if (_autoRotatingShop && _rideConstructionState == RIDE_CONSTRUCTION_STATE_PLACE if (_autoRotatingShop && _rideConstructionState == RIDE_CONSTRUCTION_STATE_PLACE
&& ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) && ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))
{ {
TileElement* pathsByDir[4]; TileElement* pathsByDir[NumOrthogonalDirections];
bool keepOrientation = false; bool keepOrientation = false;
for (int8_t i = 0; i < 4; i++) for (int8_t i = 0; i < NumOrthogonalDirections; i++)
{ {
pathsByDir[i] = map_get_footpath_element({ mapCoords->x + (DirectionOffsets[i].x * COORDS_XY_STEP), pathsByDir[i] = map_get_footpath_element({ *mapCoords + CoordsDirectionDelta[i], z });
mapCoords->y + (DirectionOffsets[i].y * COORDS_XY_STEP), z });
if (pathsByDir[i] && (pathsByDir[i])->AsPath()->IsSloped() && (pathsByDir[i])->AsPath()->GetSlopeDirection() != i) if (pathsByDir[i] && (pathsByDir[i])->AsPath()->IsSloped() && (pathsByDir[i])->AsPath()->GetSlopeDirection() != i)
{ {
@ -3631,9 +3630,7 @@ void ride_construction_toolupdate_construct(ScreenCoordsXY screenCoords)
// Sloped path on the level below // Sloped path on the level below
if (!pathsByDir[i]) if (!pathsByDir[i])
{ {
pathsByDir[i] = map_get_footpath_element({ mapCoords->x + (DirectionOffsets[i].x * COORDS_XY_STEP), pathsByDir[i] = map_get_footpath_element({ *mapCoords + CoordsDirectionDelta[i], z - PATH_HEIGHT_STEP });
mapCoords->y + (DirectionOffsets[i].y * COORDS_XY_STEP),
z - PATH_HEIGHT_STEP });
if (pathsByDir[i] if (pathsByDir[i]
&& (!(pathsByDir[i])->AsPath()->IsSloped() && (!(pathsByDir[i])->AsPath()->IsSloped()