aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTom Grimshaw2010-06-26 23:20:28 -0700
committerTom Grimshaw2010-06-26 23:20:28 -0700
commitef0ac7c4032ebb369479c18a4f2cc432b613234f (patch)
treeaf0e16e3653d339e344c058a7051528f2881cb0d /OpenSim
parentRestore "AllowCareminsterFunctions" as an alias to the new "AllowLightshareFu... (diff)
downloadopensim-SC_OLD-ef0ac7c4032ebb369479c18a4f2cc432b613234f.zip
opensim-SC_OLD-ef0ac7c4032ebb369479c18a4f2cc432b613234f.tar.gz
opensim-SC_OLD-ef0ac7c4032ebb369479c18a4f2cc432b613234f.tar.bz2
opensim-SC_OLD-ef0ac7c4032ebb369479c18a4f2cc432b613234f.tar.xz
Deal with incoming land objects properly so they don't just stack up
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 91c8130..cfee1b0 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1303,18 +1303,31 @@ namespace OpenSim.Region.CoreModules.World.Land
1303 1303
1304 public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data) 1304 public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data)
1305 { 1305 {
1306 for (int i = 0; i < data.Count; i++) 1306 lock (m_landList)
1307 { 1307 {
1308 IncomingLandObjectFromStorage(data[i]); 1308 //Remove all the land objects in the sim and then process our new data
1309 foreach (int n in m_landList.Keys)
1310 {
1311 m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID);
1312 }
1313 m_landIDList.Initialize();
1314 m_landList.Clear();
1315
1316 for (int i = 0; i < data.Count; i++)
1317 {
1318 IncomingLandObjectFromStorage(data[i]);
1319 }
1309 } 1320 }
1310 } 1321 }
1311 1322
1312 public void IncomingLandObjectFromStorage(LandData data) 1323 public void IncomingLandObjectFromStorage(LandData data)
1313 { 1324 {
1325
1314 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); 1326 ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
1315 new_land.LandData = data.Copy(); 1327 new_land.LandData = data.Copy();
1316 new_land.SetLandBitmapFromByteArray(); 1328 new_land.SetLandBitmapFromByteArray();
1317 AddLandObject(new_land); 1329 AddLandObject(new_land);
1330 new_land.SendLandUpdateToAvatarsOverMe();
1318 } 1331 }
1319 1332
1320 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) 1333 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)