dont use SendTerrainUpdatesByViewDistance option, code executes as true.

the option will have other use
avinationmerge
UbitUmarov 2015-08-21 03:04:52 +01:00
parent 6555bbffaa
commit 4bb55cad67
1 changed files with 20 additions and 46 deletions

View File

@ -515,8 +515,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
// ITerrainModule.PushTerrain()
public void PushTerrain(IClientAPI pClient)
{
if (m_sendTerrainUpdatesByViewDistance)
{
ScenePresence presence = m_scene.GetScenePresence(pClient.AgentId);
if (presence != null)
@ -534,12 +532,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
}
}
}
else
{
// The traditional way is to call into the protocol stack to send them all.
pClient.SendLayerData(new float[10]);
}
}
#region Plugin Loading Methods
@ -956,8 +948,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
/// <param name="x">The patch corner to send</param>
/// <param name="y">The patch corner to send</param>
private void SendToClients(TerrainData terrData, int x, int y)
{
if (m_sendTerrainUpdatesByViewDistance)
{
// Add that this patch needs to be sent to the accounting for each client.
lock (m_perClientPatchUpdates)
@ -976,22 +966,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
);
}
}
else
{
// Legacy update sending where the update is sent out as soon as noticed
// We know the actual terrain data passed is ignored. This kludge saves changing IClientAPI.
//float[] heightMap = terrData.GetFloatsSerialized();
float[] heightMap = new float[10];
m_scene.ForEachClient(
delegate(IClientAPI controller)
{
controller.SendLayerData(x / Constants.TerrainPatchSize,
y / Constants.TerrainPatchSize,
heightMap);
}
);
}
}
private class PatchesToSend : IComparable<PatchesToSend>
{