diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f143c239e8..03a37898de 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -90,6 +90,7 @@ what it is today. * M.Igarashi * maimedleech * Mic Bowman +* Michelle Argus * Mike Pitman (IBM) * mikkopa/_someone - RealXtend * Mircea Kitsune diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 9ae5415911..98c84ae5a0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5028,7 +5028,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerModifyTerrain = OnModifyTerrain; if (handlerModifyTerrain != null) { - modify.ModifyBlock.Height = -1; // Hack, i don't know why the value is wrong handlerModifyTerrain(AgentId, modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize, modify.ModifyBlock.Action, modify.ParcelData[i].North, diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs index 2fa0c3fd83..9aa3dfff64 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs @@ -41,34 +41,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes int x, y; - duration = 0.009; //MCP Should be read from ini file - - // Disabled - just use the client value. - /* - if (rz < 0) { - double sum = 0.0; - double step2 = 0.0; - - - // 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++) { @@ -77,19 +49,28 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes if (!mask[x,y]) continue; - double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration; - - if (z > 0) // add in non-zero amount + double z; + if (duration < 4.0) { - if (z > 1.0) - z = 1.0; - - map[x, y] = (map[x, y] * (1.0 - z)) + (rz * z); + z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration * 0.25; + } + else { + z = 1.0; } double delta = rz - map[x, y]; if (Math.Abs(delta) > 0.1) - delta *= 0.25; + { + if (z > 1.0) + { + z = 1.0; + } + else if (z < 0.0) + { + z = 0.0; + } + delta *= z; + } if (delta != 0) // add in non-zero amount { diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 08b18305cc..4d01f2248b 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -299,7 +299,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain /// UUID of script-owner public void ModifyTerrain(UUID user, Vector3 pos, byte size, byte action, UUID agentId) { - client_OnModifyTerrain(user, (float)pos.Z, (float)0.25, size, action, pos.Y, pos.X, pos.Y, pos.X, agentId); + float duration = 0.25f; + if (action == 0) + duration = 4.0f; + client_OnModifyTerrain(user, (float)pos.Z, duration, size, action, pos.Y, pos.X, pos.Y, pos.X, agentId); } ///