aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.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/ErodeSphere.cs
parentPatch by Fly-Man, with modifications. Add more fields to DataSnapshot. (diff)
downloadopensim-SC_OLD-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.zip
opensim-SC_OLD-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.gz
opensim-SC_OLD-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.bz2
opensim-SC_OLD-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 '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs24
1 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs
index dae4cf8..3fa3f8a 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
150 150
151 #region ITerrainPaintableEffect Members 151 #region ITerrainPaintableEffect Members
152 152
153 public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) 153 public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, double strength, double duration)
154 { 154 {
155 strength = TerrainUtil.MetersToSphericalStrength(strength); 155 strength = TerrainUtil.MetersToSphericalStrength(strength);
156 156
@@ -173,10 +173,13 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
173 { 173 {
174 for (y = 0; y < water.Height; y++) 174 for (y = 0; y < water.Height; y++)
175 { 175 {
176 const double solConst = (1.0 / rounds); 176 if (mask[x,y])
177 double sedDelta = water[x, y] * solConst; 177 {
178 map[x, y] -= sedDelta; 178 const double solConst = (1.0 / rounds);
179 sediment[x, y] += sedDelta; 179 double sedDelta = water[x, y] * solConst;
180 map[x, y] -= sedDelta;
181 sediment[x, y] += sedDelta;
182 }
180 } 183 }
181 } 184 }
182 185
@@ -292,8 +295,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
292 double sedimentDeposit = sediment[x, y] - waterCapacity; 295 double sedimentDeposit = sediment[x, y] - waterCapacity;
293 if (sedimentDeposit > 0) 296 if (sedimentDeposit > 0)
294 { 297 {
295 sediment[x, y] -= sedimentDeposit; 298 if (mask[x,y])
296 map[x, y] += sedimentDeposit; 299 {
300 sediment[x, y] -= sedimentDeposit;
301 map[x, y] += sedimentDeposit;
302 }
297 } 303 }
298 } 304 }
299 } 305 }
@@ -302,10 +308,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
302 // Deposit any remainder (should be minimal) 308 // Deposit any remainder (should be minimal)
303 for (x = 0; x < water.Width; x++) 309 for (x = 0; x < water.Width; x++)
304 for (y = 0; y < water.Height; y++) 310 for (y = 0; y < water.Height; y++)
305 if (sediment[x, y] > 0) 311 if (mask[x,y] && sediment[x, y] > 0)
306 map[x, y] += sediment[x, y]; 312 map[x, y] += sediment[x, y];
307 } 313 }
308 314
309 #endregion 315 #endregion
310 } 316 }
311} \ No newline at end of file 317}