* No more massive spires and massive pits when editing land using Select + tool + amount + apply;

ThreadPoolClientBranch
Teravus Ovares 2008-01-29 06:16:06 +00:00
parent da0fa4253b
commit 832243c6e8
1 changed files with 11 additions and 1 deletions

View File

@ -165,7 +165,11 @@ namespace OpenSim.Region.Terrain
{
// Shiny.
double size = (double) (1 << brushsize);
//System.Console.WriteLine("SIZE:" + size.ToString() + " Seconds:" + seconds.ToString());
if (seconds == 1)
{
seconds = 0.0315f;
}
/* Okay, so here's the deal
* This has to handle both when a user draws on the terrain *and* when a user selects
* a selection of AABB on terrain and applies whatever routine the client requests
@ -202,6 +206,8 @@ namespace OpenSim.Region.Terrain
{
FlattenTerrain(y, x, size, (double) seconds/5.0);
lastEdit = DateTime.Now;
remoteUser.SendLayerData((int)(x / 16), (int)(x / 16), GetHeights1D());
}
}
break;
@ -213,6 +219,7 @@ namespace OpenSim.Region.Terrain
{
RaiseTerrain(y, x, size, (double) seconds/5.0);
lastEdit = DateTime.Now;
remoteUser.SendLayerData((int)(x / 16), (int)(x / 16), GetHeights1D());
}
}
break;
@ -224,6 +231,7 @@ namespace OpenSim.Region.Terrain
{
LowerTerrain(y, x, size, (double) seconds/5.0);
lastEdit = DateTime.Now;
remoteUser.SendLayerData((int)(x / 16), (int)(x / 16), GetHeights1D());
}
}
break;
@ -297,6 +305,8 @@ namespace OpenSim.Region.Terrain
}
/// <summary>
/// Checks to make sure the terrain is within baked values +/- maxRaise/minLower
/// </summary>