diff options
Diffstat (limited to '')
3 files changed, 18 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 2d2772b..44fd994 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
237 | } | 237 | } |
238 | 238 | ||
239 | if (!m_merge) | 239 | if (!m_merge) |
240 | m_scene.LandChannel.Clear(); | 240 | m_scene.LandChannel.Clear(false); |
241 | 241 | ||
242 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); | 242 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); |
243 | m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); | 243 | m_log.InfoFormat("[ARCHIVER]: Restored {0} parcels.", landData.Count); |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 2959eb4..7d990c2 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -117,10 +117,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
117 | return new List<ILandObject>(); | 117 | return new List<ILandObject>(); |
118 | } | 118 | } |
119 | 119 | ||
120 | public void Clear() | 120 | public void Clear(bool setupDefaultParcel) |
121 | { | 121 | { |
122 | if (m_landManagementModule != null) | 122 | if (m_landManagementModule != null) |
123 | m_landManagementModule.Clear(); | 123 | m_landManagementModule.Clear(setupDefaultParcel); |
124 | } | 124 | } |
125 | 125 | ||
126 | public List<ILandObject> ParcelsNearPoint(Vector3 position) | 126 | public List<ILandObject> ParcelsNearPoint(Vector3 position) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 7d030c7..a46be13 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -298,13 +298,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
298 | m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; | 298 | m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; |
299 | m_landIDList.Initialize(); | 299 | m_landIDList.Initialize(); |
300 | } | 300 | } |
301 | 301 | } | |
302 | |||
303 | /// <summary> | ||
304 | /// Create a default parcel that spans the entire region and is owned by the estate owner. | ||
305 | /// </summary> | ||
306 | /// <returns>The parcel created.</returns> | ||
307 | protected ILandObject CreateDefaultParcel() | ||
308 | { | ||
302 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); | 309 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); |
303 | |||
304 | fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); | 310 | fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); |
305 | fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 311 | fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
306 | fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); | 312 | fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); |
307 | AddLandObject(fullSimParcel); | 313 | return AddLandObject(fullSimParcel); |
308 | } | 314 | } |
309 | 315 | ||
310 | public List<ILandObject> AllParcels() | 316 | public List<ILandObject> AllParcels() |
@@ -640,7 +646,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
640 | /// <summary> | 646 | /// <summary> |
641 | /// Clear the scene of all parcels | 647 | /// Clear the scene of all parcels |
642 | /// </summary> | 648 | /// </summary> |
643 | public void Clear() | 649 | public void Clear(bool setupDefaultParcel) |
644 | { | 650 | { |
645 | lock (m_landList) | 651 | lock (m_landList) |
646 | { | 652 | { |
@@ -654,6 +660,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
654 | } | 660 | } |
655 | 661 | ||
656 | ResetSimLandObjects(); | 662 | ResetSimLandObjects(); |
663 | |||
664 | if (setupDefaultParcel) | ||
665 | CreateDefaultParcel(); | ||
657 | } | 666 | } |
658 | 667 | ||
659 | private void performFinalLandJoin(ILandObject master, ILandObject slave) | 668 | private void performFinalLandJoin(ILandObject master, ILandObject slave) |
@@ -1321,7 +1330,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1321 | } | 1330 | } |
1322 | } | 1331 | } |
1323 | 1332 | ||
1324 | |||
1325 | void ClientOnParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client) | 1333 | void ClientOnParcelDeedToGroup(int parcelLocalID, UUID groupID, IClientAPI remote_client) |
1326 | { | 1334 | { |
1327 | ILandObject land; | 1335 | ILandObject land; |
@@ -1337,10 +1345,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1337 | { | 1345 | { |
1338 | land.DeedToGroup(groupID); | 1346 | land.DeedToGroup(groupID); |
1339 | } | 1347 | } |
1340 | |||
1341 | } | 1348 | } |
1342 | 1349 | ||
1343 | |||
1344 | #region Land Object From Storage Functions | 1350 | #region Land Object From Storage Functions |
1345 | 1351 | ||
1346 | public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data) | 1352 | public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data) |
@@ -1375,6 +1381,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1375 | public void EventManagerOnNoLandDataFromStorage() | 1381 | public void EventManagerOnNoLandDataFromStorage() |
1376 | { | 1382 | { |
1377 | ResetSimLandObjects(); | 1383 | ResetSimLandObjects(); |
1384 | CreateDefaultParcel(); | ||
1378 | } | 1385 | } |
1379 | 1386 | ||
1380 | #endregion | 1387 | #endregion |
@@ -1646,7 +1653,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1646 | 1653 | ||
1647 | protected void ClearCommand(Object[] args) | 1654 | protected void ClearCommand(Object[] args) |
1648 | { | 1655 | { |
1649 | Clear(); | 1656 | Clear(true); |
1650 | 1657 | ||
1651 | MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName); | 1658 | MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.RegionInfo.RegionName); |
1652 | } | 1659 | } |