diff options
author | Justin Clarke Casey | 2008-10-07 14:49:12 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-07 14:49:12 +0000 |
commit | 48d86fb23f7ae0e7919274d67fc25f590e6845b1 (patch) | |
tree | efd239c7ccf4dd09a7c81fd06ebe6f1c5bf2c174 /OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs | |
parent | From: chris yeoh <yeohc@au1.ibm.com> (diff) | |
download | opensim-SC_OLD-48d86fb23f7ae0e7919274d67fc25f590e6845b1.zip opensim-SC_OLD-48d86fb23f7ae0e7919274d67fc25f590e6845b1.tar.gz opensim-SC_OLD-48d86fb23f7ae0e7919274d67fc25f590e6845b1.tar.bz2 opensim-SC_OLD-48d86fb23f7ae0e7919274d67fc25f590e6845b1.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=1207
* Implmements llModifyLand() and a check for the "Allow others to terraform flag"
* Thanks tglion!
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/LowerSphere.cs index 08b2879..fe82396 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 | |||
34 | { | 34 | { |
35 | #region ITerrainPaintableEffect Members | 35 | #region ITerrainPaintableEffect Members |
36 | 36 | ||
37 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) | 37 | public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration) |
38 | { | 38 | { |
39 | strength = TerrainUtil.MetersToSphericalStrength(strength); | 39 | strength = TerrainUtil.MetersToSphericalStrength(strength); |
40 | duration = 0.03; //MCP Should be read from ini file | 40 | duration = 0.03; //MCP Should be read from ini file |
@@ -42,15 +42,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
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 |
@@ -66,4 +61,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
66 | 61 | ||
67 | #endregion | 62 | #endregion |
68 | } | 63 | } |
69 | } \ No newline at end of file | 64 | } |