aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs5
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs67
2 files changed, 57 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index f656fb6..99128bc 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -1149,10 +1149,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1149 1149
1150 if (selectedParcel == null) return; 1150 if (selectedParcel == null) return;
1151 1151
1152 if (returnType == 16) // parcel return 1152 selectedParcel.returnLandObjects(returnType, agentIDs, taskIDs, remoteClient);
1153 {
1154 selectedParcel.returnLandObjects(returnType, agentIDs, remoteClient);
1155 }
1156 } 1153 }
1157 1154
1158 public void NoLandDataFromStorage() 1155 public void NoLandDataFromStorage()
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 208338f..1483118 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -776,28 +776,73 @@ namespace OpenSim.Region.Environment.Modules.World.Land
776 m_scene.returnObjects(objs, obj.OwnerID); 776 m_scene.returnObjects(objs, obj.OwnerID);
777 } 777 }
778 778
779 public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client) 779 public void returnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
780 { 780 {
781 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); 781 Dictionary<UUID,List<SceneObjectGroup>> returns =
782 for (int i = 0; i < owners.Length; i++) 782 new Dictionary<UUID,List<SceneObjectGroup>>();
783
784 lock (primsOverMe)
783 { 785 {
784 lock (primsOverMe) 786 if (type == (uint)ObjectReturnType.Owner)
785 { 787 {
786 try 788 foreach (SceneObjectGroup obj in primsOverMe)
787 { 789 {
788 foreach (SceneObjectGroup obj in primsOverMe) 790 if (obj.OwnerID == m_landData.OwnerID)
789 { 791 {
790 if (obj.OwnerID == owners[i]) 792 if (!returns.ContainsKey(obj.OwnerID))
791 objlist.Add(obj); 793 returns[obj.OwnerID] =
794 new List<SceneObjectGroup>();
795 returns[obj.OwnerID].Add(obj);
792 } 796 }
793 } 797 }
794 catch (InvalidOperationException) 798 }
799 else if (type == (uint)ObjectReturnType.Group && m_landData.GroupID != UUID.Zero)
800 {
801 foreach (SceneObjectGroup obj in primsOverMe)
802 {
803 if (obj.GroupID == m_landData.GroupID)
804 {
805 if (!returns.ContainsKey(obj.OwnerID))
806 returns[obj.OwnerID] =
807 new List<SceneObjectGroup>();
808 returns[obj.OwnerID].Add(obj);
809 }
810 }
811 }
812 else if (type == (uint)ObjectReturnType.Other)
813 {
814 foreach (SceneObjectGroup obj in primsOverMe)
815 {
816 if (obj.OwnerID != m_landData.OwnerID &&
817 (obj.GroupID != m_landData.GroupID ||
818 m_landData.GroupID == UUID.Zero))
819 {
820 if (!returns.ContainsKey(obj.OwnerID))
821 returns[obj.OwnerID] =
822 new List<SceneObjectGroup>();
823 returns[obj.OwnerID].Add(obj);
824 }
825 }
826 }
827 else if (type == (uint)ObjectReturnType.List)
828 {
829 List<UUID> ownerlist = new List<UUID>(owners);
830
831 foreach (SceneObjectGroup obj in primsOverMe)
795 { 832 {
796 m_log.Info("[PARCEL]: Unable to figure out all the objects owned by " + owners[i].ToString() + " arr."); 833 if (ownerlist.Contains(obj.OwnerID))
834 {
835 if (!returns.ContainsKey(obj.OwnerID))
836 returns[obj.OwnerID] =
837 new List<SceneObjectGroup>();
838 returns[obj.OwnerID].Add(obj);
839 }
797 } 840 }
798 } 841 }
799 } 842 }
800 m_scene.returnObjects(objlist.ToArray(), remote_client.AgentId); 843
844 foreach (List<SceneObjectGroup> ol in returns.Values)
845 m_scene.returnObjects(ol.ToArray(), remote_client.AgentId);
801 } 846 }
802 847
803 #endregion 848 #endregion