diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs index d3a1d3d..7a1ec72 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, bool[,] mask, double rx, double ry, double rz, double strength, double duration) | 44 | public void PaintEffect(ITerrainChannel map, double rx, double ry, 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,10 +54,15 @@ 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 | |||
57 | int y; | 61 | int y; |
58 | for (y = 0; y < map.Height; y++) | 62 | for (y = 0; y < map.Height; y++) |
59 | { | 63 | { |
60 | if (!mask[x,y]) | 64 | // Skip everything unlikely to be affected |
65 | if (Math.Abs(y - ry) > strength * 1.1) | ||
61 | continue; | 66 | continue; |
62 | 67 | ||
63 | // Calculate a sphere and add it to the heighmap | 68 | // Calculate a sphere and add it to the heighmap |