aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/RaiseSphere.cs
index 92bac63..e4fe091 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, bool[,] mask, double rx, double ry, double rz, double strength, double duration) 38 public void PaintEffect(ITerrainChannel map, double rx, double ry, 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,10 +43,15 @@ 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
46 int y; 50 int y;
47 for (y = 0; y < map.Height; y++) 51 for (y = 0; y < map.Height; y++)
48 { 52 {
49 if (!mask[x,y]) 53 // Skip everything unlikely to be affected
54 if (Math.Abs(y - ry) > strength * 1.1)
50 continue; 55 continue;
51 56
52 // Calculate a sphere and add it to the heighmap 57 // Calculate a sphere and add it to the heighmap
@@ -62,4 +67,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
62 67
63 #endregion 68 #endregion
64 } 69 }
65} 70} \ No newline at end of file