Deal with incoming land objects properly so they don't just stack up

avinationmerge
Tom Grimshaw 2010-06-26 23:20:28 -07:00
parent 9f00f141fe
commit ef0ac7c403
1 changed files with 15 additions and 2 deletions

View File

@ -1303,18 +1303,31 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
{
for (int i = 0; i < data.Count; i++)
lock (m_landList)
{
IncomingLandObjectFromStorage(data[i]);
//Remove all the land objects in the sim and then process our new data
foreach (int n in m_landList.Keys)
{
m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID);
}
m_landIDList.Initialize();
m_landList.Clear();
for (int i = 0; i < data.Count; i++)
{
IncomingLandObjectFromStorage(data[i]);
}
}
}
public void IncomingLandObjectFromStorage(LandData data)
{
ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
new_land.LandData = data.Copy();
new_land.SetLandBitmapFromByteArray();
AddLandObject(new_land);
new_land.SendLandUpdateToAvatarsOverMe();
}
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)