mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user