* 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

@@ -58,12 +58,14 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FloodBrushes
avg = sum / steps;
double str = 0.1 * strength; // == 0.2 in the default client
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)
{
if (fillArea[x, y] == true)
map[x, y] = avg;
map[x, y] = (map[x, y] * (1.0 - str)) + (avg * str);
}
}
}