MapGen: minor biome weight fix

This commit is contained in:
Van
2026-06-26 22:24:52 +03:00
parent 80c0f45f34
commit c0fe6c683e

View File

@@ -537,7 +537,7 @@ function Layer:initBiomesDiagram()
---Half the distance between the centers of two nearest biomes (i.e. the distance to the biome boundary) ---Half the distance between the centers of two nearest biomes (i.e. the distance to the biome boundary)
local distance2 = (pastClosestBiome.tempPoint - closestBiome.tempPoint)^2 + (pastClosestBiome.humidityPoint - closestBiome.humidityPoint) / 2 local distance2 = (pastClosestBiome.tempPoint - closestBiome.tempPoint)^2 + (pastClosestBiome.humidityPoint - closestBiome.humidityPoint) / 2
weight = mathClamp(distance1 / distance2, 0, 1) weight = 1 - mathClamp(distance1 / distance2, 0, 1)
else else
weight = 1 weight = 1
end end