From 48d86fb23f7ae0e7919274d67fc25f590e6845b1 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 7 Oct 2008 14:49:12 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=1207 * Implmements llModifyLand() and a check for the "Allow others to terraform flag" * Thanks tglion! --- .../Modules/World/Terrain/PaintBrushes/RaiseSphere.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 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 e4fe091..92bac63 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, double rx, double ry, double strength, double duration) + public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration) { duration = 0.03; //MCP Should be read from ini file strength = TerrainUtil.MetersToSphericalStrength(strength); @@ -43,15 +43,10 @@ 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++) { - // Skip everything unlikely to be affected - if (Math.Abs(y - ry) > strength * 1.1) + if (!mask[x,y]) continue; // Calculate a sphere and add it to the heighmap @@ -67,4 +62,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes #endregion } -} \ No newline at end of file +} -- cgit v1.1