diff options
author | Charles Krinke | 2008-10-06 00:46:27 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-06 00:46:27 +0000 |
commit | 4f6cdc08d65cbdd60591d08d71c1c7648a3032cd (patch) | |
tree | c124af14da43a3b6f15d8a96d8ed151cbfca05b5 /OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs | |
parent | Patch by Fly-Man, with modifications. Add more fields to DataSnapshot. (diff) | |
download | opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.zip opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.gz opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.bz2 opensim-SC-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 'OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs | 24 |
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 | } |