From 47c21216b2b5869b62b4114386290d9537e80799 Mon Sep 17 00:00:00 2001 From: Philip Keiter Date: Wed, 21 Dec 2022 03:27:01 -0600 Subject: [PATCH] Update wrap water generation of two continents to support tall maps. (#8192) --- .../unciv/logic/map/mapgenerator/MapLandmassGenerator.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt b/core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt index cef659d771..fdd01476fa 100644 --- a/core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt +++ b/core/src/com/unciv/logic/map/mapgenerator/MapLandmassGenerator.kt @@ -246,14 +246,14 @@ class MapLandmassGenerator(val ruleset: Ruleset, val randomness: MapGenerationRa val latitudeFactor = abs(tileInfo.latitude) / tileMap.maxLatitude 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 - // 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) - longitudeFactor = min(longitudeFactor, + factor = min(longitudeFactor, (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 - // 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)