mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Improve legibility of ride placement # attempt calculation
This commit is contained in:
@@ -3561,7 +3561,8 @@ void ride_construction_toolupdate_construct(ScreenCoordsXY screenCoords)
|
|||||||
|
|
||||||
_previousTrackPiece = _currentTrackBegin;
|
_previousTrackPiece = _currentTrackBegin;
|
||||||
// search for appropriate z value for ghost, up to max ride height
|
// 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)
|
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
|
// 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)
|
if (ride->type == RIDE_TYPE_MAZE)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user