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/RaiseSphere.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs index 92bac63..e4fe091 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs @@ -35,7 +35,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) { duration = 0.03; //MCP Should be read from ini file strength = TerrainUtil.MetersToSphericalStrength(strength); @@ -43,10 +43,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 @@ -62,4 +67,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes #endregion } -} +} \ No newline at end of file -- cgit v1.1