mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Confusion of 'radius' and 'diameter' in variable names and comments.
parent
e43e4327a7
commit
b9bd7b2cfe
|
@ -1261,9 +1261,9 @@ protected:
|
|||
|
||||
/* Check if we should widen river depending on how far we are away from the source. */
|
||||
uint current_river_length = DistanceManhattan(this->spring, tile);
|
||||
uint radius = std::min(3u, (current_river_length / (long_river_length / 3u)) + 1u);
|
||||
uint diameter = std::min(3u, (current_river_length / (long_river_length / 3u)) + 1u);
|
||||
|
||||
if (radius > 1) CircularTileSearch(&tile, radius, RiverMakeWider, &path->key.tile);
|
||||
if (diameter > 1) CircularTileSearch(&tile, diameter, RiverMakeWider, &path->key.tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1362,11 +1362,11 @@ static std::tuple<bool, bool> FlowRiver(TileIndex spring, TileIndex begin, uint
|
|||
DistanceManhattan(spring, lake_centre) > min_river_length) {
|
||||
end = lake_centre;
|
||||
MakeRiverAndModifyDesertZoneAround(lake_centre);
|
||||
uint range = RandomRange(8) + 3;
|
||||
CircularTileSearch(&lake_centre, range, MakeLake, &height_begin);
|
||||
uint diameter = RandomRange(8) + 3;
|
||||
CircularTileSearch(&lake_centre, diameter, MakeLake, &height_begin);
|
||||
/* Call the search a second time so artefacts from going circular in one direction get (mostly) hidden. */
|
||||
lake_centre = end;
|
||||
CircularTileSearch(&lake_centre, range, MakeLake, &height_begin);
|
||||
CircularTileSearch(&lake_centre, diameter, MakeLake, &height_begin);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ void MakeWaterKeepingClass(TileIndex tile, Owner o);
|
|||
void CheckForDockingTile(TileIndex t);
|
||||
|
||||
void MakeRiverAndModifyDesertZoneAround(TileIndex tile);
|
||||
static const uint RIVER_OFFSET_DESERT_DISTANCE = 5; ///< Circular tile search radius to create non-desert around a river tile.
|
||||
static const uint RIVER_OFFSET_DESERT_DISTANCE = 5; ///< Circular tile search diameter to create non-desert around a river tile.
|
||||
|
||||
bool IsWateredTile(TileIndex tile, Direction from);
|
||||
|
||||
|
|
Loading…
Reference in New Issue