From 1ef7a05b3e44e104c11b3ba631454f9a3716987b Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Mon, 21 Jul 2008 19:29:55 +0000
Subject: 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.
---
.../Modules/World/Terrain/FloodBrushes/RevertArea.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Environment/Modules')
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
#region ITerrainFloodEffect Members
+ ///
+ /// reverts an area of the map to the heightfield stored in the revertmap
+ ///
+ /// the current heightmap
+ /// array indicating which sections of the map are to be reverted
+ /// unused
public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
{
int x;
@@ -50,7 +56,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
{
if (fillArea[x, y])
{
- map[x, y] = (map[x, y] * (1.0 - strength)) + (m_revertmap[x, y] * strength);
+ map[x, y] = m_revertmap[x, y];
}
}
}
@@ -58,4 +64,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
#endregion
}
-}
\ No newline at end of file
+}
--
cgit v1.1