diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs index e507481..c103d99 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs | |||
@@ -40,6 +40,30 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
40 | 40 | ||
41 | int x, y; | 41 | int x, y; |
42 | 42 | ||
43 | if (rz < 0) { | ||
44 | double sum = 0.0; | ||
45 | double step2 = 0.0; | ||
46 | duration = 0.009; //MCP Should be read from ini file | ||
47 | |||
48 | |||
49 | // compute delta map | ||
50 | for (x = 0; x < map.Width; x++) | ||
51 | { | ||
52 | for (y = 0; y < map.Height; y++) | ||
53 | { | ||
54 | double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); | ||
55 | |||
56 | if (z > 0) // add in non-zero amount | ||
57 | { | ||
58 | sum += map[x, y] * z; | ||
59 | step2 += z; | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | rz = sum / step2; | ||
64 | } | ||
65 | |||
66 | |||
43 | // blend in map | 67 | // blend in map |
44 | for (x = 0; x < map.Width; x++) | 68 | for (x = 0; x < map.Width; x++) |
45 | { | 69 | { |