aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs24
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d2f46e5..b2138aa 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4179,6 +4179,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4179 handlerModifyTerrain = OnModifyTerrain; 4179 handlerModifyTerrain = OnModifyTerrain;
4180 if (handlerModifyTerrain != null) 4180 if (handlerModifyTerrain != null)
4181 { 4181 {
4182 modify.ModifyBlock.Height = -1; // Hack, i don't know why the value is wrong
4182 handlerModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, 4183 handlerModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds,
4183 modify.ModifyBlock.BrushSize, 4184 modify.ModifyBlock.BrushSize,
4184 modify.ModifyBlock.Action, modify.ParcelData[i].North, 4185 modify.ModifyBlock.Action, modify.ParcelData[i].North,
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 {