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/RaiseSphere.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/RaiseSphere.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs | 11 |
1 files changed, 3 insertions, 8 deletions
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 | |||
35 | #region ITerrainPaintableEffect Members | 35 | #region ITerrainPaintableEffect Members |
36 | 36 | ||
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 | duration = 0.03; //MCP Should be read from ini file | 40 | duration = 0.03; //MCP Should be read from ini file |
41 | strength = TerrainUtil.MetersToSphericalStrength(strength); | 41 | strength = TerrainUtil.MetersToSphericalStrength(strength); |
@@ -43,15 +43,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
43 | int x; | 43 | int x; |
44 | for (x = 0; x < map.Width; x++) | 44 | for (x = 0; x < map.Width; x++) |
45 | { | 45 | { |
46 | // Skip everything unlikely to be affected | ||
47 | if (Math.Abs(x - rx) > strength * 1.1) | ||
48 | continue; | ||
49 | |||
50 | int y; | 46 | int y; |
51 | for (y = 0; y < map.Height; y++) | 47 | for (y = 0; y < map.Height; y++) |
52 | { | 48 | { |
53 | // Skip everything unlikely to be affected | 49 | if (!mask[x,y]) |
54 | if (Math.Abs(y - ry) > strength * 1.1) | ||
55 | continue; | 50 | continue; |
56 | 51 | ||
57 | // Calculate a sphere and add it to the heighmap | 52 | // Calculate a sphere and add it to the heighmap |
@@ -67,4 +62,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
67 | 62 | ||
68 | #endregion | 63 | #endregion |
69 | } | 64 | } |
70 | } \ No newline at end of file | 65 | } |