mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
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.
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user