diff options
author | UbitUmarov | 2017-01-27 20:21:24 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-27 20:21:24 +0000 |
commit | 0091c37ed3fd3f9ed4edf079a61f986daadca16b (patch) | |
tree | 6e5ca5cb7fa6ae6325d5222b37f39a794a48d345 /OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |
parent | parcels must be loaded before objects, so they can be added to them (diff) | |
download | opensim-SC_OLD-0091c37ed3fd3f9ed4edf079a61f986daadca16b.zip opensim-SC_OLD-0091c37ed3fd3f9ed4edf079a61f986daadca16b.tar.gz opensim-SC_OLD-0091c37ed3fd3f9ed4edf079a61f986daadca16b.tar.bz2 opensim-SC_OLD-0091c37ed3fd3f9ed4edf079a61f986daadca16b.tar.xz |
several changes relative to objects return and parcel prim counts: avoid null refs, report correct count of returned objects, make obkects counts by ownership coerent with return rules, etc
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 66be5e5..dfa7095 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -149,9 +149,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
149 | parcelInfoCache.Size = 30; // the number of different parcel requests in this region to cache | 149 | parcelInfoCache.Size = 30; // the number of different parcel requests in this region to cache |
150 | parcelInfoCache.DefaultTTL = new TimeSpan(0, 5, 0); | 150 | parcelInfoCache.DefaultTTL = new TimeSpan(0, 5, 0); |
151 | 151 | ||
152 | m_scene.EventManager.OnObjectAddedToScene += EventManagerOnParcelPrimCountAdd; | ||
152 | m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; | 153 | m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd; |
153 | m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; | 154 | |
154 | m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene; | 155 | m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene; |
156 | m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate; | ||
155 | m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate; | 157 | m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate; |
156 | 158 | ||
157 | m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; | 159 | m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel; |
@@ -815,6 +817,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
815 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 817 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
816 | } | 818 | } |
817 | 819 | ||
820 | if(m_landList.Count == 0 || m_landIDList == null) | ||
821 | return null; | ||
822 | |||
818 | lock (m_landIDList) | 823 | lock (m_landIDList) |
819 | { | 824 | { |
820 | try | 825 | try |
@@ -826,8 +831,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
826 | return null; | 831 | return null; |
827 | } | 832 | } |
828 | } | 833 | } |
829 | |||
830 | return m_landList[m_landIDList[x / 4, y / 4]]; | ||
831 | } | 834 | } |
832 | 835 | ||
833 | // Create a 'parcel is here' bitmap for the parcel identified by the passed landID | 836 | // Create a 'parcel is here' bitmap for the parcel identified by the passed landID |
@@ -1642,9 +1645,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1642 | foreach (HashSet<SceneObjectGroup> objs in returns.Values) | 1645 | foreach (HashSet<SceneObjectGroup> objs in returns.Values) |
1643 | { | 1646 | { |
1644 | List<SceneObjectGroup> objs2 = new List<SceneObjectGroup>(objs); | 1647 | List<SceneObjectGroup> objs2 = new List<SceneObjectGroup>(objs); |
1645 | if (m_scene.Permissions.CanReturnObjects(null, remoteClient.AgentId, objs2)) | 1648 | if (m_scene.Permissions.CanReturnObjects(null, remoteClient, objs2)) |
1646 | { | 1649 | { |
1647 | m_scene.returnObjects(objs2.ToArray(), remoteClient.AgentId); | 1650 | m_scene.returnObjects(objs2.ToArray(), remoteClient); |
1648 | } | 1651 | } |
1649 | else | 1652 | else |
1650 | { | 1653 | { |
@@ -2037,7 +2040,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2037 | { | 2040 | { |
2038 | SceneObjectGroup[] objs = new SceneObjectGroup[1]; | 2041 | SceneObjectGroup[] objs = new SceneObjectGroup[1]; |
2039 | objs[0] = obj; | 2042 | objs[0] = obj; |
2040 | ((Scene)client.Scene).returnObjects(objs, client.AgentId); | 2043 | ((Scene)client.Scene).returnObjects(objs, client); |
2041 | } | 2044 | } |
2042 | 2045 | ||
2043 | Dictionary<UUID, System.Threading.Timer> Timers = new Dictionary<UUID, System.Threading.Timer>(); | 2046 | Dictionary<UUID, System.Threading.Timer> Timers = new Dictionary<UUID, System.Threading.Timer>(); |