mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 15:29:32 +07:00
Update wrap water generation of two continents to support tall maps. (#8192)
This commit is contained in:
@ -246,14 +246,14 @@ class MapLandmassGenerator(val ruleset: Ruleset, val randomness: MapGenerationRa
|
|||||||
val latitudeFactor = abs(tileInfo.latitude) / tileMap.maxLatitude
|
val latitudeFactor = abs(tileInfo.latitude) / tileMap.maxLatitude
|
||||||
var longitudeFactor = abs(tileInfo.longitude) / tileMap.maxLongitude
|
var longitudeFactor = abs(tileInfo.longitude) / tileMap.maxLongitude
|
||||||
|
|
||||||
|
var factor = if (isLatitude) latitudeFactor else longitudeFactor
|
||||||
|
|
||||||
// If this is a world wrap, we want it to be separated on both sides -
|
// If this is a world wrap, we want it to be separated on both sides -
|
||||||
// so we make the actual strip of water thinner, but we put it both in the middle of the map and on the edges of the map
|
// so we make the actual strip of water thinner, but we put it both in the middle of the map and on the edges of the map
|
||||||
if (tileMap.mapParameters.worldWrap)
|
if (tileMap.mapParameters.worldWrap)
|
||||||
longitudeFactor = min(longitudeFactor,
|
factor = min(longitudeFactor,
|
||||||
(tileMap.maxLongitude - abs(tileInfo.longitude)) / tileMap.maxLongitude) * 1.5f
|
(tileMap.maxLongitude - abs(tileInfo.longitude)) / tileMap.maxLongitude) * 1.5f
|
||||||
|
|
||||||
val factor = if (isLatitude) latitudeFactor else longitudeFactor
|
|
||||||
|
|
||||||
// there's nothing magical about this, it's just what we got from playing around with a lot of different options -
|
// there's nothing magical about this, it's just what we got from playing around with a lot of different options -
|
||||||
// the numbers can be changed if you find that something else creates better looking continents
|
// the numbers can be changed if you find that something else creates better looking continents
|
||||||
return min(0.2, -1.0 + (5.0 * factor.pow(0.6f) + randomScale) / 3.0)
|
return min(0.2, -1.0 + (5.0 * factor.pow(0.6f) + randomScale) / 3.0)
|
||||||
|
Reference in New Issue
Block a user