diff options
author | Charles Krinke | 2008-10-06 00:58:43 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-06 00:58:43 +0000 |
commit | e575ef7ad2245aad17f57273f6bd7b774f99f057 (patch) | |
tree | a85fd727bac7f3d39259df3aaea6c93f3f32ba05 /OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs | |
parent | Mantis#2336. Thank you kindly, Ralphos for a patch that: (diff) | |
download | opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.zip opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.tar.gz opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.tar.bz2 opensim-SC-e575ef7ad2245aad17f57273f6bd7b774f99f057.tar.xz |
Revert r6697 patch as the build fails.
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, 9 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/ErodeSphere.cs index 3fa3f8a..dae4cf8 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, bool[,] mask, double rx, double ry, double rz, double strength, double duration) | 153 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) |
154 | { | 154 | { |
155 | strength = TerrainUtil.MetersToSphericalStrength(strength); | 155 | strength = TerrainUtil.MetersToSphericalStrength(strength); |
156 | 156 | ||
@@ -173,13 +173,10 @@ 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 | if (mask[x,y]) | 176 | const double solConst = (1.0 / rounds); |
177 | { | 177 | double sedDelta = water[x, y] * solConst; |
178 | const double solConst = (1.0 / rounds); | 178 | map[x, y] -= sedDelta; |
179 | double sedDelta = water[x, y] * solConst; | 179 | sediment[x, y] += sedDelta; |
180 | map[x, y] -= sedDelta; | ||
181 | sediment[x, y] += sedDelta; | ||
182 | } | ||
183 | } | 180 | } |
184 | } | 181 | } |
185 | 182 | ||
@@ -295,11 +292,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
295 | double sedimentDeposit = sediment[x, y] - waterCapacity; | 292 | double sedimentDeposit = sediment[x, y] - waterCapacity; |
296 | if (sedimentDeposit > 0) | 293 | if (sedimentDeposit > 0) |
297 | { | 294 | { |
298 | if (mask[x,y]) | 295 | sediment[x, y] -= sedimentDeposit; |
299 | { | 296 | map[x, y] += sedimentDeposit; |
300 | sediment[x, y] -= sedimentDeposit; | ||
301 | map[x, y] += sedimentDeposit; | ||
302 | } | ||
303 | } | 297 | } |
304 | } | 298 | } |
305 | } | 299 | } |
@@ -308,10 +302,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes | |||
308 | // Deposit any remainder (should be minimal) | 302 | // Deposit any remainder (should be minimal) |
309 | for (x = 0; x < water.Width; x++) | 303 | for (x = 0; x < water.Width; x++) |
310 | for (y = 0; y < water.Height; y++) | 304 | for (y = 0; y < water.Height; y++) |
311 | if (mask[x,y] && sediment[x, y] > 0) | 305 | if (sediment[x, y] > 0) |
312 | map[x, y] += sediment[x, y]; | 306 | map[x, y] += sediment[x, y]; |
313 | } | 307 | } |
314 | 308 | ||
315 | #endregion | 309 | #endregion |
316 | } | 310 | } |
317 | } | 311 | } \ No newline at end of file |