aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
index 0c4e3de..7bf88f0 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
43 double sum = 0.0; 43 double sum = 0.0;
44 double step2 = 0.0; 44 double step2 = 0.0;
45 45
46 // compute delta map 46 // compute delta map
47 for (x = 0; x < map.Width; x++) 47 for (x = 0; x < map.Width; x++)
48 { 48 {
49 for (y = 0; y < map.Height; y++) 49 for (y = 0; y < map.Height; y++)
50 { 50 {
51 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength); 51 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
52 52
53 if (z > 0) // add in non-zero amount 53 if (z > 0) // add in non-zero amount
54 { 54 {
55 sum += map[x, y] * z; 55 sum += map[x, y] * z;
56 step2 += z; 56 step2 += z;
@@ -60,14 +60,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
60 60
61 double avg = sum / step2; 61 double avg = sum / step2;
62 62
63 // blend in map 63 // blend in map
64 for (x = 0; x < map.Width; x++) 64 for (x = 0; x < map.Width; x++)
65 { 65 {
66 for (y = 0; y < map.Height; y++) 66 for (y = 0; y < map.Height; y++)
67 { 67 {
68 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; 68 double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration;
69 69
70 if (z > 0) // add in non-zero amount 70 if (z > 0) // add in non-zero amount
71 { 71 {
72 if (z > 1.0) 72 if (z > 1.0)
73 z = 1.0; 73 z = 1.0;