aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2017-05-14 06:27:29 +0100
committerUbitUmarov2017-05-14 06:27:29 +0100
commit156707edfb88b9ddf679751f8f6d8128b2abd7be (patch)
tree3e5a4f79fa453999edc9e5a680624041067034e4 /OpenSim
parent don't round to nearest int (diff)
downloadopensim-SC-156707edfb88b9ddf679751f8f6d8128b2abd7be.zip
opensim-SC-156707edfb88b9ddf679751f8f6d8128b2abd7be.tar.gz
opensim-SC-156707edfb88b9ddf679751f8f6d8128b2abd7be.tar.bz2
opensim-SC-156707edfb88b9ddf679751f8f6d8128b2abd7be.tar.xz
clear land object on delete
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/ILandObject.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs12
3 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index f3b850d..a783256 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -189,5 +189,7 @@ namespace OpenSim.Framework
189 /// </summary> 189 /// </summary>
190 /// <returns>The music url.</returns> 190 /// <returns>The music url.</returns>
191 string GetMusicUrl(); 191 string GetMusicUrl();
192
193 void Clear();
192 } 194 }
193} 195}
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 6f32a77..057e204 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -274,6 +274,9 @@ namespace OpenSim.Region.CoreModules.World.Land
274 //Remove all the land objects in the sim and add a blank, full sim land object set to public 274 //Remove all the land objects in the sim and add a blank, full sim land object set to public
275 lock (m_landList) 275 lock (m_landList)
276 { 276 {
277 foreach(ILandObject parcel in m_landList.Values)
278 parcel.Clear();
279
277 m_landList.Clear(); 280 m_landList.Clear();
278 m_landUUIDList.Clear(); 281 m_landUUIDList.Clear();
279 m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; 282 m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
@@ -696,6 +699,7 @@ namespace OpenSim.Region.CoreModules.World.Land
696 m_landList.Remove(local_id); 699 m_landList.Remove(local_id);
697 if(land.LandData != null) 700 if(land.LandData != null)
698 m_landUUIDList.Remove(land.LandData.GlobalID); 701 m_landUUIDList.Remove(land.LandData.GlobalID);
702 land.Clear();
699 } 703 }
700 704
701 m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID); 705 m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID);
@@ -746,7 +750,7 @@ namespace OpenSim.Region.CoreModules.World.Land
746 } 750 }
747 } 751 }
748 } 752 }
749 753 master.LandData.Dwell += slave.LandData.Dwell;
750 removeLandObject(slave.LandData.LocalID); 754 removeLandObject(slave.LandData.LocalID);
751 UpdateLandObject(master.LandData.LocalID, master.LandData); 755 UpdateLandObject(master.LandData.LocalID, master.LandData);
752 } 756 }
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index ccb85f6..b534a2b 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -269,6 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Land
269 { 269 {
270 LandData = landData.Copy(); 270 LandData = landData.Copy();
271 m_scene = scene; 271 m_scene = scene;
272 m_scene.EventManager.OnFrame += OnFrame;
272 m_dwellModule = m_scene.RequestModuleInterface<IDwellModule>(); 273 m_dwellModule = m_scene.RequestModuleInterface<IDwellModule>();
273 } 274 }
274 275
@@ -296,9 +297,20 @@ namespace OpenSim.Region.CoreModules.World.Land
296 297
297 LandData.IsGroupOwned = is_group_owned; 298 LandData.IsGroupOwned = is_group_owned;
298 299
300 if(m_dwellModule == null)
301 LandData.Dwell = 0;
302
299 m_scene.EventManager.OnFrame += OnFrame; 303 m_scene.EventManager.OnFrame += OnFrame;
300 } 304 }
301 305
306 public void Clear()
307 {
308 if(m_scene != null)
309 m_scene.EventManager.OnFrame -= OnFrame;
310 LandData = null;
311 }
312
313
302 #endregion 314 #endregion
303 315
304 #region Member Functions 316 #region Member Functions