diff options
author | Justin Clark-Casey (justincc) | 2011-01-27 18:48:48 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-01-27 18:48:48 +0000 |
commit | 5a26dc2743f176cc5f5fad0ae93aa8187a399f13 (patch) | |
tree | e48f513ed8ee8271c92930adbbeaf6c7fbd01798 | |
parent | remove unused CreateBaseLand() (diff) | |
download | opensim-SC_OLD-5a26dc2743f176cc5f5fad0ae93aa8187a399f13.zip opensim-SC_OLD-5a26dc2743f176cc5f5fad0ae93aa8187a399f13.tar.gz opensim-SC_OLD-5a26dc2743f176cc5f5fad0ae93aa8187a399f13.tar.bz2 opensim-SC_OLD-5a26dc2743f176cc5f5fad0ae93aa8187a399f13.tar.xz |
Fix OAR parcel loading so that old parcels are replaced by the new instead of merged.
The --merge switch will still merge the old and new land parcelling.
Diffstat (limited to '')
6 files changed, 44 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 3238a81..6a96d87 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -230,6 +230,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
230 | parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 230 | parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
231 | landData.Add(parcel); | 231 | landData.Add(parcel); |
232 | } | 232 | } |
233 | |||
234 | if (!m_merge) | ||
235 | m_scene.LandChannel.Clear(); | ||
236 | |||
233 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); | 237 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); |
234 | m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); | 238 | m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); |
235 | 239 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 9e27ef0..2959eb4 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -116,6 +116,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
116 | 116 | ||
117 | return new List<ILandObject>(); | 117 | return new List<ILandObject>(); |
118 | } | 118 | } |
119 | |||
120 | public void Clear() | ||
121 | { | ||
122 | if (m_landManagementModule != null) | ||
123 | m_landManagementModule.Clear(); | ||
124 | } | ||
119 | 125 | ||
120 | public List<ILandObject> ParcelsNearPoint(Vector3 position) | 126 | public List<ILandObject> ParcelsNearPoint(Vector3 position) |
121 | { | 127 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4db28e2..bee223a 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -636,6 +636,25 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
636 | m_landList.Remove(local_id); | 636 | m_landList.Remove(local_id); |
637 | } | 637 | } |
638 | } | 638 | } |
639 | |||
640 | /// <summary> | ||
641 | /// Clear the scene of all parcels | ||
642 | /// </summary> | ||
643 | public void Clear() | ||
644 | { | ||
645 | lock (m_landList) | ||
646 | { | ||
647 | foreach (ILandObject lo in m_landList.Values) | ||
648 | { | ||
649 | //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID); | ||
650 | m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID); | ||
651 | } | ||
652 | |||
653 | m_landList.Clear(); | ||
654 | } | ||
655 | |||
656 | ResetSimLandObjects(); | ||
657 | } | ||
639 | 658 | ||
640 | private void performFinalLandJoin(ILandObject master, ILandObject slave) | 659 | private void performFinalLandJoin(ILandObject master, ILandObject slave) |
641 | { | 660 | { |
diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs index 20b8ab6..17570c6 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs | |||
@@ -69,6 +69,11 @@ namespace OpenSim.Region.Framework.Interfaces | |||
69 | /// <returns></returns> | 69 | /// <returns></returns> |
70 | ILandObject GetLandObject(int localID); | 70 | ILandObject GetLandObject(int localID); |
71 | 71 | ||
72 | /// <summary> | ||
73 | /// Clear the land channel of all parcels. | ||
74 | /// </summary> | ||
75 | void Clear(); | ||
76 | |||
72 | bool IsLandPrimCountTainted(); | 77 | bool IsLandPrimCountTainted(); |
73 | bool IsForcefulBansAllowed(); | 78 | bool IsForcefulBansAllowed(); |
74 | void UpdateLandObject(int localID, LandData data); | 79 | void UpdateLandObject(int localID, LandData data); |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs index be5411a..c2480b7 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs | |||
@@ -62,6 +62,11 @@ public class RegionCombinerLargeLandChannel : ILandChannel | |||
62 | { | 62 | { |
63 | return RootRegionLandChannel.AllParcels(); | 63 | return RootRegionLandChannel.AllParcels(); |
64 | } | 64 | } |
65 | |||
66 | public void Clear() | ||
67 | { | ||
68 | RootRegionLandChannel.Clear(); | ||
69 | } | ||
65 | 70 | ||
66 | public ILandObject GetLandObject(int x, int y) | 71 | public ILandObject GetLandObject(int x, int y) |
67 | { | 72 | { |
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs index 159764c..366af67 100644 --- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs +++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs | |||
@@ -55,6 +55,11 @@ namespace OpenSim.Tests.Common.Mock | |||
55 | { | 55 | { |
56 | return new List<ILandObject>(); | 56 | return new List<ILandObject>(); |
57 | } | 57 | } |
58 | |||
59 | public void Clear() | ||
60 | { | ||
61 | // Intentionally blank since we don't save any parcel data in the test channel | ||
62 | } | ||
58 | 63 | ||
59 | protected ILandObject GetNoLand() | 64 | protected ILandObject GetNoLand() |
60 | { | 65 | { |