diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/TerrainChannel.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/TerrainChannel.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 3d563a6..282a44a 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs | |||
@@ -395,17 +395,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
395 | // Fill the heightmap with the center bump terrain | 395 | // Fill the heightmap with the center bump terrain |
396 | private void PinHeadIsland() | 396 | private void PinHeadIsland() |
397 | { | 397 | { |
398 | float cx = m_terrainData.SizeX * 0.5f; | ||
399 | float cy = m_terrainData.SizeY * 0.5f; | ||
400 | float h; | ||
398 | for (int x = 0; x < Width; x++) | 401 | for (int x = 0; x < Width; x++) |
399 | { | 402 | { |
400 | for (int y = 0; y < Height; y++) | 403 | for (int y = 0; y < Height; y++) |
401 | { | 404 | { |
402 | m_terrainData[x, y] = (float)TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10; | 405 | h = (float)TerrainUtil.PerlinNoise2D(x, y, 2, 0.125) * 10; |
403 | float spherFacA = (float)(TerrainUtil.SphericalFactor(x, y, m_terrainData.SizeX / 2.0, m_terrainData.SizeY / 2.0, 50) * 0.01d); | 406 | float spherFacA = (float)(TerrainUtil.SphericalFactor(x, y, cx, cy, 50) * 0.01d); |
404 | float spherFacB = (float)(TerrainUtil.SphericalFactor(x, y, m_terrainData.SizeX / 2.0, m_terrainData.SizeY / 2.0, 100) * 0.001d); | 407 | float spherFacB = (float)(TerrainUtil.SphericalFactor(x, y, cx, cy, 100) * 0.001d); |
405 | if (m_terrainData[x, y]< spherFacA) | 408 | if (h < spherFacA) |
406 | m_terrainData[x, y]= spherFacA; | 409 | h = spherFacA; |
407 | if (m_terrainData[x, y]< spherFacB) | 410 | if (h < spherFacB) |
408 | m_terrainData[x, y] = spherFacB; | 411 | h = spherFacB; |
412 | m_terrainData[x, y] = h; | ||
409 | } | 413 | } |
410 | } | 414 | } |
411 | } | 415 | } |