aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes
diff options
context:
space:
mode:
authorAdam Frisby2008-03-14 13:37:39 +0000
committerAdam Frisby2008-03-14 13:37:39 +0000
commit53e8d91c06b3fc5cf61ba767930fa733a6efb232 (patch)
tree28db1d0e7e96c737da680bef72de527e2dacfb8f /OpenSim/Region/Environment/Modules/Terrain/PaintBrushes
parent* Added proper handling of llSetStatus(STATUS_PHYSICS,BOOL) (diff)
downloadopensim-SC_OLD-53e8d91c06b3fc5cf61ba767930fa733a6efb232.zip
opensim-SC_OLD-53e8d91c06b3fc5cf61ba767930fa733a6efb232.tar.gz
opensim-SC_OLD-53e8d91c06b3fc5cf61ba767930fa733a6efb232.tar.bz2
opensim-SC_OLD-53e8d91c06b3fc5cf61ba767930fa733a6efb232.tar.xz
* Fixed 'flatten area' brush, so it now has a 'force' instead of instantly flattening the selected area.
* Noise, and Noise-Area brushes now use Perlin noise, more closely simulating the method LL uses officially. * TerrainModule has been cleaned up slightly. * TerrainUtil class has several new functions related to seeded noise generation. * Extracted ITerrainEffect, ITerrainFloodEffect, ITerrainLoader, ITerrainPaintableEffect, TerrainChannel to seperate files.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain/PaintBrushes')
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs
index 4a03a17..9754a99 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs
@@ -57,15 +57,10 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
57 z *= z; 57 z *= z;
58 z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); 58 z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry));
59 59
60 double noise; 60 double noise = TerrainUtil.PerlinNoise2D((double)x / (double)Framework.Constants.RegionSize, (double)y / (double)Framework.Constants.RegionSize, 8, 1.0);
61
62 lock (Util.RandomClass)
63 {
64 noise = Util.RandomClass.NextDouble();
65 }
66 61
67 if (z > 0.0) 62 if (z > 0.0)
68 map[x, y] += (noise - 0.5) * z * duration; 63 map[x, y] += noise * z * duration;
69 } 64 }
70 } 65 }
71 } 66 }