aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorCharles Krinke2008-10-08 14:51:55 +0000
committerCharles Krinke2008-10-08 14:51:55 +0000
commitac443559d119ef2aed5a7e1469e091d5197b358c (patch)
tree47fc136cee98b85e80fcd5da7a9a671e9e5b49e1 /OpenSim/Region
parentadding OSHttpResponse test case (yeah, very primitive still) (diff)
downloadopensim-SC_OLD-ac443559d119ef2aed5a7e1469e091d5197b358c.zip
opensim-SC_OLD-ac443559d119ef2aed5a7e1469e091d5197b358c.tar.gz
opensim-SC_OLD-ac443559d119ef2aed5a7e1469e091d5197b358c.tar.bz2
opensim-SC_OLD-ac443559d119ef2aed5a7e1469e091d5197b358c.tar.xz
Mantis#2354. Thank you kindly, Tglion for a patch that:
The average-value of modify.ModifyBlock.Height in LLClientView.cs:4170 seem to be incorrect or it isn't the average? Mhhh... So the terrain build -> Flaten Sphere is unuseable. I have put in a patch that contains a workaround while the main problem is not solved.
Diffstat (limited to 'OpenSim/Region')
-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 {