From 4f6cdc08d65cbdd60591d08d71c1c7648a3032cd Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 6 Oct 2008 00:46:27 +0000 Subject: Mantis#1207. Thank you, TGlion for a patch that addresses: Implementation of llModifyLand() and There is a bug on permission-check of land-terraforming: x an y-coordinates are interchanged on function-call ExternalChecksCanTerraformLand. Correct: x is west, and y is north. 2) Missing check of "Other allow to terraform-flag" (Parcel.ParcelFlags.AllowTerraform) --- .../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