* 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.
This commit is contained in:
Adam Frisby
2008-03-14 13:37:39 +00:00
parent ae9a98ceb1
commit 53e8d91c06
10 changed files with 338 additions and 215 deletions

View File

@@ -57,15 +57,10 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
z *= z;
z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry));
double noise;
lock (Util.RandomClass)
{
noise = Util.RandomClass.NextDouble();
}
double noise = TerrainUtil.PerlinNoise2D((double)x / (double)Framework.Constants.RegionSize, (double)y / (double)Framework.Constants.RegionSize, 8, 1.0);
if (z > 0.0)
map[x, y] += (noise - 0.5) * z * duration;
map[x, y] += noise * z * duration;
}
}
}