aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
index 7a1ec72..d3a1d3d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
41 41
42 #region ITerrainPaintableEffect Members 42 #region ITerrainPaintableEffect Members
43 43
44 public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) 44 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration)
45 { 45 {
46 strength = TerrainUtil.MetersToSphericalStrength(strength); 46 strength = TerrainUtil.MetersToSphericalStrength(strength);
47 duration = 0.03; //MCP Should be read from ini file 47 duration = 0.03; //MCP Should be read from ini file
@@ -54,15 +54,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
54 int x; 54 int x;
55 for (x = 0; x < map.Width; x++) 55 for (x = 0; x < map.Width; x++)
56 { 56 {
57 // Skip everything unlikely to be affected
58 if (Math.Abs(x - rx) > strength * 1.1)
59 continue;
60
61 int y; 57 int y;
62 for (y = 0; y < map.Height; y++) 58 for (y = 0; y < map.Height; y++)
63 { 59 {
64 // Skip everything unlikely to be affected 60 if (!mask[x,y])
65 if (Math.Abs(y - ry) > strength * 1.1)
66 continue; 61 continue;
67 62
68 // Calculate a sphere and add it to the heighmap 63 // Calculate a sphere and add it to the heighmap