aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorCharles Krinke2008-07-21 19:29:55 +0000
committerCharles Krinke2008-07-21 19:29:55 +0000
commit1ef7a05b3e44e104c11b3ba631454f9a3716987b (patch)
treea84e817f59b9c1b5c9de164a56b1238b22fd9095 /OpenSim/Region/Environment/Modules
parent* minor: stick filename being loaded/saved from in save/load xml/oar informat... (diff)
downloadopensim-SC_OLD-1ef7a05b3e44e104c11b3ba631454f9a3716987b.zip
opensim-SC_OLD-1ef7a05b3e44e104c11b3ba631454f9a3716987b.tar.gz
opensim-SC_OLD-1ef7a05b3e44e104c11b3ba631454f9a3716987b.tar.bz2
opensim-SC_OLD-1ef7a05b3e44e104c11b3ba631454f9a3716987b.tar.xz
Mantis#1544. Thank you kindly, Jonc, for a patch that:
Terrain revert using the PaintBrushes appears to work OK, however when using 'apply to selection' the RevertArea FloodEffect calculates the revert height incorrectly unless the strength passed in from the viewer is 1.0 Attaching a patch to correctly reset the selected area to the heights in the revertmap.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs
index bebcae5..602a5cc 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs
@@ -40,6 +40,12 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
40 40
41 #region ITerrainFloodEffect Members 41 #region ITerrainFloodEffect Members
42 42
43 /// <summary>
44 /// reverts an area of the map to the heightfield stored in the revertmap
45 /// </summary>
46 /// <param name="map">the current heightmap</param>
47 /// <param name="fillArea">array indicating which sections of the map are to be reverted</param>
48 /// <param name="strength">unused</param>
43 public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) 49 public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
44 { 50 {
45 int x; 51 int x;
@@ -50,7 +56,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
50 { 56 {
51 if (fillArea[x, y]) 57 if (fillArea[x, y])
52 { 58 {
53 map[x, y] = (map[x, y] * (1.0 - strength)) + (m_revertmap[x, y] * strength); 59 map[x, y] = m_revertmap[x, y];
54 } 60 }
55 } 61 }
56 } 62 }
@@ -58,4 +64,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
58 64
59 #endregion 65 #endregion
60 } 66 }
61} \ No newline at end of file 67}