Change terrain update sending to be triggered by frame tick rather

than everytime terrain is changed.

The TerrainModule now hooks the frame event and, if terrain has changed,
sends terrain updates to the clients. This polling pattern replaces
the previous push on change pattern and will make it easier to do per
client throttling and per scene presence terrain update ordering.
This commit is contained in:
Robert Adams
2014-03-10 22:01:55 -07:00
parent 0237d9113d
commit 742f505440
3 changed files with 139 additions and 66 deletions

View File

@@ -124,17 +124,7 @@ namespace OpenSim.Region.Framework.Scenes
// and the caller will probably do the wrong thing if the terrain is not the legacy 256x256.
public float[] GetFloatsSerialised()
{
int points = Width * Height;
float[] heights = new float[points];
int idx = 0;
for (int jj = 0; jj < Height; jj++)
for (int ii = 0; ii < Width; ii++)
{
heights[idx++] = m_terrainData[ii, jj];
}
return heights;
return m_terrainData.GetFloatsSerialized();
}
// ITerrainChannel.GetDoubles()