aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-10-07 14:49:12 +0000
committerJustin Clarke Casey2008-10-07 14:49:12 +0000
commit48d86fb23f7ae0e7919274d67fc25f590e6845b1 (patch)
treeefd239c7ccf4dd09a7c81fd06ebe6f1c5bf2c174 /OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
parentFrom: chris yeoh <yeohc@au1.ibm.com> (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
index 7a1ec72..d3a1d3d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RevertSphere.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
41 41
42 #region ITerrainPaintableEffect Members 42 #region ITerrainPaintableEffect Members
43 43
44 public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) 44 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration)
45 { 45 {
46 strength = TerrainUtil.MetersToSphericalStrength(strength); 46 strength = TerrainUtil.MetersToSphericalStrength(strength);
47 duration = 0.03; //MCP Should be read from ini file 47 duration = 0.03; //MCP Should be read from ini file
@@ -54,15 +54,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
54 int x; 54 int x;
55 for (x = 0; x < map.Width; x++) 55 for (x = 0; x < map.Width; x++)
56 { 56 {
57 // Skip everything unlikely to be affected
58 if (Math.Abs(x - rx) > strength * 1.1)
59 continue;
60
61 int y; 57 int y;
62 for (y = 0; y < map.Height; y++) 58 for (y = 0; y < map.Height; y++)
63 { 59 {
64 // Skip everything unlikely to be affected 60 if (!mask[x,y])
65 if (Math.Abs(y - ry) > strength * 1.1)
66 continue; 61 continue;
67 62
68 // Calculate a sphere and add it to the heighmap 63 // Calculate a sphere and add it to the heighmap