From c009e2e0956ab6c43aebe0ba9275a0dbcc25e9ce Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 29 Feb 2008 20:36:14 +0000 Subject: From: Mike Pitman Below is a patch for the smooth tool. I factored out the essential computations and placed it in a channel method to work similar to raise and lower. It now performs about the same rate as raise and lower. --- OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs') diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index decbb73..b34ca5e 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -251,7 +251,6 @@ namespace OpenSim.Region.Terrain //SmoothTerrain(y, x , size, (double)seconds / 5.0); //} //} - SmoothTerrain(west, north, size, (double) seconds/5.0); break; @@ -1331,14 +1330,9 @@ namespace OpenSim.Region.Terrain { lock (heightmap) { - Channel smoothed = heightmap.Copy(); - smoothed.Smooth(amount); - - Channel mask = new Channel(); - mask.Raise(rx, ry, size, amount); - - heightmap.Blend(smoothed, mask); - } + // perform essential computation as a channel method + heightmap.SmoothRegion(rx, ry, size, amount); + } tainted++; } -- cgit v1.1