diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4d887a8..d0727d9 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -72,6 +72,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
72 | protected Commander m_commander = new Commander("land"); | 72 | protected Commander m_commander = new Commander("land"); |
73 | 73 | ||
74 | protected IUserManagement m_userManager; | 74 | protected IUserManagement m_userManager; |
75 | protected IPrimCountModule m_primCountModule; | ||
75 | 76 | ||
76 | // Minimum for parcels to work is 64m even if we don't actually use them. | 77 | // Minimum for parcels to work is 64m even if we don't actually use them. |
77 | #pragma warning disable 0429 | 78 | #pragma warning disable 0429 |
@@ -147,6 +148,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
147 | public void RegionLoaded(Scene scene) | 148 | public void RegionLoaded(Scene scene) |
148 | { | 149 | { |
149 | m_userManager = m_scene.RequestModuleInterface<IUserManagement>(); | 150 | m_userManager = m_scene.RequestModuleInterface<IUserManagement>(); |
151 | m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>(); | ||
150 | } | 152 | } |
151 | 153 | ||
152 | public void RemoveRegion(Scene scene) | 154 | public void RemoveRegion(Scene scene) |
@@ -309,10 +311,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
309 | // m_log.DebugFormat( | 311 | // m_log.DebugFormat( |
310 | // "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); | 312 | // "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); |
311 | 313 | ||
312 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); | 314 | ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); |
313 | fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); | 315 | fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); |
314 | fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 316 | fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
315 | fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); | 317 | fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); |
318 | |||
316 | return AddLandObject(fullSimParcel); | 319 | return AddLandObject(fullSimParcel); |
317 | } | 320 | } |
318 | 321 | ||
@@ -593,6 +596,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
593 | public ILandObject AddLandObject(ILandObject land) | 596 | public ILandObject AddLandObject(ILandObject land) |
594 | { | 597 | { |
595 | ILandObject new_land = land.Copy(); | 598 | ILandObject new_land = land.Copy(); |
599 | |||
600 | // Only now can we add the prim counts to the land object - we rely on the global ID which is generated | ||
601 | // as a random UUID inside LandData initialization | ||
602 | if (m_primCountModule != null) | ||
603 | new_land.PrimCounts = m_primCountModule.GetPrimCounts(new_land.LandData.GlobalID); | ||
596 | 604 | ||
597 | lock (m_landList) | 605 | lock (m_landList) |
598 | { | 606 | { |
@@ -1368,7 +1376,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1368 | { | 1376 | { |
1369 | ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); | 1377 | ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene); |
1370 | new_land.LandData = data.Copy(); | 1378 | new_land.LandData = data.Copy(); |
1371 | new_land.SetLandBitmapFromByteArray(); | 1379 | new_land.SetLandBitmapFromByteArray(); |
1372 | AddLandObject(new_land); | 1380 | AddLandObject(new_land); |
1373 | } | 1381 | } |
1374 | 1382 | ||