aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
authoronefang2021-08-03 14:03:27 +1000
committeronefang2021-08-03 14:03:27 +1000
commitcc14055e06e9b594e2db3a0d367bd7a86a171ca6 (patch)
treed15c4661cc34fd2b94d54460e22c1672037f3a1a /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
parenttypo-- (diff)
downloadopensim-SC-cc14055e06e9b594e2db3a0d367bd7a86a171ca6.zip
opensim-SC-cc14055e06e9b594e2db3a0d367bd7a86a171ca6.tar.gz
opensim-SC-cc14055e06e9b594e2db3a0d367bd7a86a171ca6.tar.bz2
opensim-SC-cc14055e06e9b594e2db3a0d367bd7a86a171ca6.tar.xz
Backported from 0.9.2 fix owner on user rez from a prim inventory to ground
With some minor fixes.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 8c880fc..dca22ea 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -895,6 +895,11 @@ namespace OpenSim.Region.Framework.Scenes
895 895
896 public bool GetRezReadySceneObjects(TaskInventoryItem item, out List<SceneObjectGroup> objlist, out List<Vector3> veclist, out Vector3 bbox, out float offsetHeight) 896 public bool GetRezReadySceneObjects(TaskInventoryItem item, out List<SceneObjectGroup> objlist, out List<Vector3> veclist, out Vector3 bbox, out float offsetHeight)
897 { 897 {
898 return GetRezReadySceneObjects(item, item.OwnerID, m_part.GroupID, out objlist, out veclist, out bbox, out offsetHeight);
899 }
900
901 public bool GetRezReadySceneObjects(TaskInventoryItem item, UUID NewOwner, UUID NewGroup, out List<SceneObjectGroup> objlist, out List<Vector3> veclist, out Vector3 bbox, out float offsetHeight)
902 {
898 AssetBase rezAsset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString()); 903 AssetBase rezAsset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString());
899 904
900 if (null == rezAsset) 905 if (null == rezAsset)
@@ -909,7 +914,7 @@ namespace OpenSim.Region.Framework.Scenes
909 return false; 914 return false;
910 } 915 }
911 916
912 bool single = m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight); 917 m_part.ParentGroup.Scene.GetObjectsToRez(rezAsset.Data, false, out objlist, out veclist, out bbox, out offsetHeight);
913 918
914 for (int i = 0; i < objlist.Count; i++) 919 for (int i = 0; i < objlist.Count; i++)
915 { 920 {
@@ -952,11 +957,11 @@ namespace OpenSim.Region.Framework.Scenes
952 } 957 }
953*/ 958*/
954// old code start 959// old code start
960 group.SetGroup(NewGroup, null);
955 SceneObjectPart[] partList = group.Parts; 961 SceneObjectPart[] partList = group.Parts;
956 962
957 group.SetGroup(m_part.GroupID, null); 963 bool slamThings = (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0;
958 964 if ((rootPart.OwnerID != NewOwner) || slamThings)
959 if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
960 { 965 {
961 if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) 966 if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions())
962 { 967 {
@@ -976,12 +981,12 @@ namespace OpenSim.Region.Framework.Scenes
976 981
977 foreach (SceneObjectPart part in partList) 982 foreach (SceneObjectPart part in partList)
978 { 983 {
979 if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) 984 if ((part.OwnerID != NewOwner))
980 { 985 {
981 if(part.GroupID != part.OwnerID) 986 if(part.GroupID != part.OwnerID)
982 part.LastOwnerID = part.OwnerID; 987 part.LastOwnerID = part.OwnerID;
983 part.OwnerID = item.OwnerID; 988 part.OwnerID = NewOwner;
984 part.Inventory.ChangeInventoryOwner(item.OwnerID); 989 part.Inventory.ChangeInventoryOwner(NewOwner);
985 } 990 }
986 991
987 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) 992 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)