mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
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.
This commit is contained in:
@@ -40,6 +40,30 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
|
||||
|
||||
int x, y;
|
||||
|
||||
if (rz < 0) {
|
||||
double sum = 0.0;
|
||||
double step2 = 0.0;
|
||||
duration = 0.009; //MCP Should be read from ini file
|
||||
|
||||
|
||||
// compute delta map
|
||||
for (x = 0; x < map.Width; x++)
|
||||
{
|
||||
for (y = 0; y < map.Height; y++)
|
||||
{
|
||||
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
|
||||
|
||||
if (z > 0) // add in non-zero amount
|
||||
{
|
||||
sum += map[x, y] * z;
|
||||
step2 += z;
|
||||
}
|
||||
}
|
||||
}
|
||||
rz = sum / step2;
|
||||
}
|
||||
|
||||
|
||||
// blend in map
|
||||
for (x = 0; x < map.Width; x++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user