diff options
author | Justin Clark-Casey (justincc) | 2014-03-07 01:23:19 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-03-07 01:23:19 +0000 |
commit | 6b7625a56b18901d1004505e4b8695d511603528 (patch) | |
tree | b9dd7da6e5d88b19ccedded661bf65d7c7d899a5 | |
parent | Add regression test for sending group notices via xmlrpc groups connector. (diff) | |
download | opensim-SC-6b7625a56b18901d1004505e4b8695d511603528.zip opensim-SC-6b7625a56b18901d1004505e4b8695d511603528.tar.gz opensim-SC-6b7625a56b18901d1004505e4b8695d511603528.tar.bz2 opensim-SC-6b7625a56b18901d1004505e4b8695d511603528.tar.xz |
Only auto-create a land parcel when there is none in a specified tile if there is more than 1 existing land parcel.
This is because there are still issues with bad parcels being generated in http://opensimulator.org/mantis/view.php?id=7035
Theorizing now that it's possible that something is calling GetParcel() before any parcel data has been loaded from persistence.
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index de40685..05f9f26 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -874,6 +874,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
874 | // This sometimes happens when terrain is resized. | 874 | // This sometimes happens when terrain is resized. |
875 | if (m_landList.Count == 1) | 875 | if (m_landList.Count == 1) |
876 | { | 876 | { |
877 | m_log.DebugFormat( | ||
878 | "[{0}]: Auto-extending land parcel as landID at {1},{2} is 0 and only one land parcel is present in {3}", | ||
879 | LogHeader, x, y, m_scene.Name); | ||
880 | |||
877 | int onlyParcelID = 0; | 881 | int onlyParcelID = 0; |
878 | ILandObject onlyLandObject = null; | 882 | ILandObject onlyLandObject = null; |
879 | foreach (KeyValuePair<int, ILandObject> kvp in m_landList) | 883 | foreach (KeyValuePair<int, ILandObject> kvp in m_landList) |
@@ -892,8 +896,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
892 | onlyLandObject.LandBitmap = CreateBitmapForID(onlyParcelID); | 896 | onlyLandObject.LandBitmap = CreateBitmapForID(onlyParcelID); |
893 | landID = onlyParcelID; | 897 | landID = onlyParcelID; |
894 | } | 898 | } |
895 | else | 899 | else if (m_landList.Count > 1) |
896 | { | 900 | { |
901 | m_log.DebugFormat( | ||
902 | "[{0}]: Auto-creating land parcel as landID at {1},{2} is 0 and more than one land parcel is present in {3}", | ||
903 | LogHeader, x, y, m_scene.Name); | ||
904 | |||
897 | // There are several other parcels so we must create a new one for the unassigned space | 905 | // There are several other parcels so we must create a new one for the unassigned space |
898 | ILandObject newLand = new LandObject(UUID.Zero, false, m_scene); | 906 | ILandObject newLand = new LandObject(UUID.Zero, false, m_scene); |
899 | // Claim all the unclaimed "0" ids | 907 | // Claim all the unclaimed "0" ids |
@@ -907,6 +915,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
907 | 915 | ||
908 | landID = m_lastLandLocalID; | 916 | landID = m_lastLandLocalID; |
909 | } | 917 | } |
918 | |||
919 | // XXX: We're not currently doing anything if there are no parcels, as this might indicate a race | ||
920 | // condition where this method is being called before land data is loaded. May need to address | ||
921 | // this in another way. | ||
910 | } | 922 | } |
911 | 923 | ||
912 | ret = m_landList[landID]; | 924 | ret = m_landList[landID]; |