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
parent
d9db56d86b
commit
1ef7a05b3e
|
@ -40,6 +40,12 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
|
||||||
|
|
||||||
#region ITerrainFloodEffect Members
|
#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)
|
public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
@ -50,7 +56,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes
|
||||||
{
|
{
|
||||||
if (fillArea[x, y])
|
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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue