mirror of
https://github.com/opensim/opensim.git
synced 2026-06-12 23:35:35 +08:00
* 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user