aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-08 20:51:52 +0100
committerJustin Clark-Casey (justincc)2011-09-08 20:51:52 +0100
commitbd5d2cb043892399baff85667ee1e6ec6f3b3d2e (patch)
tree60d7ab71edceede360a78f2bd32d386067a780e6 /OpenSim/Region/CoreModules
parentIncrease information in logging for UserAgentServiceConnector. (diff)
downloadopensim-SC_OLD-bd5d2cb043892399baff85667ee1e6ec6f3b3d2e.zip
opensim-SC_OLD-bd5d2cb043892399baff85667ee1e6ec6f3b3d2e.tar.gz
opensim-SC_OLD-bd5d2cb043892399baff85667ee1e6ec6f3b3d2e.tar.bz2
opensim-SC_OLD-bd5d2cb043892399baff85667ee1e6ec6f3b3d2e.tar.xz
Use scene presence agent id for rezzed object ownership rather than item owner.
These should be identical. However, the item isn't available when rezzing npc attachments.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 4e8466d..03238d9 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -724,8 +724,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
724 SceneObjectGroup group = null; 724 SceneObjectGroup group = null;
725 725
726 string xmlData = Utils.BytesToString(rezAsset.Data); 726 string xmlData = Utils.BytesToString(rezAsset.Data);
727 List<SceneObjectGroup> objlist = 727 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>();
728 new List<SceneObjectGroup>();
729 List<Vector3> veclist = new List<Vector3>(); 728 List<Vector3> veclist = new List<Vector3>();
730 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 729 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
731 Vector3 pos; 730 Vector3 pos;
@@ -797,6 +796,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
797 m_log.Debug("[InventoryAccessModule]: Object has UUID.Zero! Position 3"); 796 m_log.Debug("[InventoryAccessModule]: Object has UUID.Zero! Position 3");
798 } 797 }
799 798
799 foreach (SceneObjectPart part in group.Parts)
800 {
801 // Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset.
802 part.LastOwnerID = part.OwnerID;
803 part.OwnerID = remoteClient.AgentId;
804 }
805
800 if (!attachment) 806 if (!attachment)
801 { 807 {
802 // If it's rezzed in world, select it. Much easier to 808 // If it's rezzed in world, select it. Much easier to
@@ -833,13 +839,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
833 group.AbsolutePosition = pos + veclist[i]; 839 group.AbsolutePosition = pos + veclist[i];
834 } 840 }
835 841
836 SceneObjectPart rootPart = group.RootPart;
837
838 group.SetGroup(remoteClient.ActiveGroupId, remoteClient); 842 group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
839 843
840 if (!attachment) 844 if (!attachment)
841 { 845 {
842 if (group.RootPart.Shape.PCode == (byte)PCode.Prim) 846 SceneObjectPart rootPart = group.RootPart;
847
848 if (rootPart.Shape.PCode == (byte)PCode.Prim)
843 group.ClearPartAttachmentData(); 849 group.ClearPartAttachmentData();
844 850
845 // Fire on_rez 851 // Fire on_rez
@@ -963,11 +969,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
963 if ((part.OwnerID != item.Owner) || 969 if ((part.OwnerID != item.Owner) ||
964 (item.CurrentPermissions & 16) != 0) 970 (item.CurrentPermissions & 16) != 0)
965 { 971 {
966 part.LastOwnerID = part.OwnerID;
967 part.OwnerID = item.Owner;
968 part.Inventory.ChangeInventoryOwner(item.Owner); 972 part.Inventory.ChangeInventoryOwner(item.Owner);
969 part.GroupMask = 0; // DO NOT propagate here 973 part.GroupMask = 0; // DO NOT propagate here
970 } 974 }
975
971 part.EveryoneMask = item.EveryOnePermissions; 976 part.EveryoneMask = item.EveryOnePermissions;
972 part.NextOwnerMask = item.NextPermissions; 977 part.NextOwnerMask = item.NextPermissions;
973 } 978 }