diff options
author | Adam Frisby | 2008-03-14 13:37:39 +0000 |
---|---|---|
committer | Adam Frisby | 2008-03-14 13:37:39 +0000 |
commit | 53e8d91c06b3fc5cf61ba767930fa733a6efb232 (patch) | |
tree | 28db1d0e7e96c737da680bef72de527e2dacfb8f /OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/FlattenArea.cs | |
parent | * Added proper handling of llSetStatus(STATUS_PHYSICS,BOOL) (diff) | |
download | opensim-SC-53e8d91c06b3fc5cf61ba767930fa733a6efb232.zip opensim-SC-53e8d91c06b3fc5cf61ba767930fa733a6efb232.tar.gz opensim-SC-53e8d91c06b3fc5cf61ba767930fa733a6efb232.tar.bz2 opensim-SC-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/FloodBrushes/FlattenArea.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/FlattenArea.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/FlattenArea.cs b/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/FlattenArea.cs index 4551f53..007d37e 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/FlattenArea.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/FlattenArea.cs | |||
@@ -58,12 +58,14 @@ namespace OpenSim.Region.Environment.Modules.Terrain.FloodBrushes | |||
58 | 58 | ||
59 | avg = sum / steps; | 59 | avg = sum / steps; |
60 | 60 | ||
61 | double str = 0.1 * strength; // == 0.2 in the default client | ||
62 | |||
61 | for (x = 0; x < map.Width; x++) | 63 | for (x = 0; x < map.Width; x++) |
62 | { | 64 | { |
63 | for (y = 0; y < map.Height; y++) | 65 | for (y = 0; y < map.Height; y++) |
64 | { | 66 | { |
65 | if (fillArea[x, y] == true) | 67 | if (fillArea[x, y] == true) |
66 | map[x, y] = avg; | 68 | map[x, y] = (map[x, y] * (1.0 - str)) + (avg * str); |
67 | } | 69 | } |
68 | } | 70 | } |
69 | } | 71 | } |