MapGen: minor biome weight fix
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user