aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2015-08-19 15:24:12 +0100
committerUbitUmarov2015-08-19 15:24:12 +0100
commit7661366223f8598439c0fedcf79d8ceee42542df (patch)
tree397feb0c3ac669fcf85ae94ed0cd065078c35e0a /OpenSim
parentubitode varsize ( Mega disabled till better checks ) (diff)
downloadopensim-SC-7661366223f8598439c0fedcf79d8ceee42542df.zip
opensim-SC-7661366223f8598439c0fedcf79d8ceee42542df.tar.gz
opensim-SC-7661366223f8598439c0fedcf79d8ceee42542df.tar.bz2
opensim-SC-7661366223f8598439c0fedcf79d8ceee42542df.tar.xz
minor change
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs18
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 }