aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
diff options
context:
space:
mode:
authorSean Dague2008-02-29 20:36:14 +0000
committerSean Dague2008-02-29 20:36:14 +0000
commitc009e2e0956ab6c43aebe0ba9275a0dbcc25e9ce (patch)
treeb69db77d795779b03e90b29a327f9d5613c06a06 /OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
parentMore compiler warning cleanup. (diff)
downloadopensim-SC_OLD-c009e2e0956ab6c43aebe0ba9275a0dbcc25e9ce.zip
opensim-SC_OLD-c009e2e0956ab6c43aebe0ba9275a0dbcc25e9ce.tar.gz
opensim-SC_OLD-c009e2e0956ab6c43aebe0ba9275a0dbcc25e9ce.tar.bz2
opensim-SC_OLD-c009e2e0956ab6c43aebe0ba9275a0dbcc25e9ce.tar.xz
From: Mike Pitman <pitman@us.ibm.com>
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.
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs12
1 files changed, 3 insertions, 9 deletions
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
251 //SmoothTerrain(y, x , size, (double)seconds / 5.0); 251 //SmoothTerrain(y, x , size, (double)seconds / 5.0);
252 //} 252 //}
253 //} 253 //}
254
255 SmoothTerrain(west, north, size, (double) seconds/5.0); 254 SmoothTerrain(west, north, size, (double) seconds/5.0);
256 255
257 break; 256 break;
@@ -1331,14 +1330,9 @@ namespace OpenSim.Region.Terrain
1331 { 1330 {
1332 lock (heightmap) 1331 lock (heightmap)
1333 { 1332 {
1334 Channel smoothed = heightmap.Copy(); 1333 // perform essential computation as a channel method
1335 smoothed.Smooth(amount); 1334 heightmap.SmoothRegion(rx, ry, size, amount);
1336 1335 }
1337 Channel mask = new Channel();
1338 mask.Raise(rx, ry, size, amount);
1339
1340 heightmap.Blend(smoothed, mask);
1341 }
1342 1336
1343 tainted++; 1337 tainted++;
1344 } 1338 }