aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-10-06 00:46:27 +0000
committerCharles Krinke2008-10-06 00:46:27 +0000
commit4f6cdc08d65cbdd60591d08d71c1c7648a3032cd (patch)
treec124af14da43a3b6f15d8a96d8ed151cbfca05b5 /OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
parentPatch by Fly-Man, with modifications. Add more fields to DataSnapshot. (diff)
downloadopensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.zip
opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.gz
opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.bz2
opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.xz
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)
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
index 0824efd..23f7bc5 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/NoiseSphere.cs
@@ -35,22 +35,17 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
35 { 35 {
36 #region ITerrainPaintableEffect Members 36 #region ITerrainPaintableEffect Members
37 37
38 public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) 38 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration)
39 { 39 {
40 strength = TerrainUtil.MetersToSphericalStrength(strength); 40 strength = TerrainUtil.MetersToSphericalStrength(strength);
41 41
42 int x; 42 int x;
43 for (x = 0; x < map.Width; x++) 43 for (x = 0; x < map.Width; x++)
44 { 44 {
45 // Skip everything unlikely to be affected
46 if (Math.Abs(x - rx) > strength * 1.1)
47 continue;
48
49 int y; 45 int y;
50 for (y = 0; y < map.Height; y++) 46 for (y = 0; y < map.Height; y++)
51 { 47 {
52 // Skip everything unlikely to be affected 48 if (!mask[x,y])
53 if (Math.Abs(y - ry) > strength * 1.1)
54 continue; 49 continue;
55 50
56 // Calculate a sphere and add it to the heighmap 51 // Calculate a sphere and add it to the heighmap
@@ -68,4 +63,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
68 63
69 #endregion 64 #endregion
70 } 65 }
71} \ No newline at end of file 66}