1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Improve legibility of ride placement # attempt calculation

This commit is contained in:
Tulio Leao
2020-02-13 23:10:33 -03:00
parent d0b255d98b
commit 60e2546b2d

View File

@@ -3561,7 +3561,8 @@ void ride_construction_toolupdate_construct(ScreenCoordsXY screenCoords)
_previousTrackPiece = _currentTrackBegin;
// search for appropriate z value for ghost, up to max ride height
int numAttempts = (z <= (8 * MAX_TRACK_HEIGHT) ? MAX_TRACK_HEIGHT - (z / 8) + 1 : 2);
const auto smallZ = z / COORDS_Z_STEP;
int numAttempts = (smallZ <= MAX_TRACK_HEIGHT ? (MAX_TRACK_HEIGHT - smallZ + 1) : 2);
if (ride->type == RIDE_TYPE_MAZE)
{
@@ -3789,7 +3790,8 @@ void ride_construction_tooldown_construct(ScreenCoordsXY screenCoords)
}
// search for z value to build at, up to max ride height
int numAttempts = (z <= (8 * MAX_TRACK_HEIGHT) ? MAX_TRACK_HEIGHT - (z / 8) + 1 : 2);
const auto smallZ = z / COORDS_Z_STEP;
int numAttempts = (smallZ <= MAX_TRACK_HEIGHT ? (MAX_TRACK_HEIGHT - smallZ + 1) : 2);
if (ride->type == RIDE_TYPE_MAZE)
{