From e575ef7ad2245aad17f57273f6bd7b774f99f057 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 6 Oct 2008 00:58:43 +0000 Subject: Revert r6697 patch as the build fails. --- .../Modules/World/Terrain/PaintBrushes/LowerSphere.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs index fe82396..08b2879 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs @@ -34,7 +34,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes { #region ITerrainPaintableEffect Members - public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration) + public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) { strength = TerrainUtil.MetersToSphericalStrength(strength); duration = 0.03; //MCP Should be read from ini file @@ -42,10 +42,15 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes int x; for (x = 0; x < map.Width; x++) { + // Skip everything unlikely to be affected + if (Math.Abs(x - rx) > strength * 1.1) + continue; + int y; for (y = 0; y < map.Height; y++) { - if (!mask[x,y]) + // Skip everything unlikely to be affected + if (Math.Abs(y - ry) > strength * 1.1) continue; // Calculate a sphere and add it to the heighmap @@ -61,4 +66,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes #endregion } -} +} \ No newline at end of file -- cgit v1.1