diff options
author | Charles Krinke | 2008-10-08 14:51:55 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-08 14:51:55 +0000 |
commit | ac443559d119ef2aed5a7e1469e091d5197b358c (patch) | |
tree | 47fc136cee98b85e80fcd5da7a9a671e9e5b49e1 /OpenSim/Region/Environment | |
parent | adding OSHttpResponse test case (yeah, very primitive still) (diff) | |
download | opensim-SC-ac443559d119ef2aed5a7e1469e091d5197b358c.zip opensim-SC-ac443559d119ef2aed5a7e1469e091d5197b358c.tar.gz opensim-SC-ac443559d119ef2aed5a7e1469e091d5197b358c.tar.bz2 opensim-SC-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 '')
-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 | { |