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.
0.6.0-stable
Charles Krinke 2008-07-21 19:29:55 +00:00
parent d9db56d86b
commit 1ef7a05b3e
1 changed files with 8 additions and 2 deletions

View File

@ -40,6 +40,12 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
#region ITerrainFloodEffect Members
/// <summary>
/// reverts an area of the map to the heightfield stored in the revertmap
/// </summary>
/// <param name="map">the current heightmap</param>
/// <param name="fillArea">array indicating which sections of the map are to be reverted</param>
/// <param name="strength">unused</param>
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
}
}
}