diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
3 files changed, 15 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 6dc982b..92485a1 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -2620,7 +2620,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2620 | { | 2620 | { |
2621 | // FIXME: It would be better to never add the scene object at all rather than add it and then delete | 2621 | // FIXME: It would be better to never add the scene object at all rather than add it and then delete |
2622 | // it | 2622 | // it |
2623 | if (!Scene.Permissions.CanObjectEntry(so.UUID, true, so.AbsolutePosition)) | 2623 | if (!Scene.Permissions.CanObjectEntry(so, true, so.AbsolutePosition)) |
2624 | { | 2624 | { |
2625 | // Deny non attachments based on parcel settings | 2625 | // Deny non attachments based on parcel settings |
2626 | // | 2626 | // |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 95e7456..ba3a7c9 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -541,16 +541,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
541 | 541 | ||
542 | #region Permissions | 542 | #region Permissions |
543 | 543 | ||
544 | private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene) | 544 | private bool CanTakeObject(SceneObjectGroup sog, ScenePresence sp) |
545 | { | 545 | { |
546 | if (m_bypassPermissions) return true; | 546 | if (m_bypassPermissions) return true; |
547 | 547 | ||
548 | if (!m_OutboundPermission && !UserManagementModule.IsLocalGridUser(stealer)) | 548 | if(sp == null || sog == null) |
549 | return false; | ||
550 | |||
551 | if (!m_OutboundPermission && !UserManagementModule.IsLocalGridUser(sp.UUID)) | ||
549 | { | 552 | { |
550 | SceneObjectGroup sog = null; | 553 | if (sog.OwnerID == sp.UUID) |
551 | if (m_Scene.TryGetSceneObjectGroup(objectID, out sog) && sog.OwnerID == stealer) | ||
552 | return true; | 554 | return true; |
553 | |||
554 | return false; | 555 | return false; |
555 | } | 556 | } |
556 | 557 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index b37744d..67c847b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -427,20 +427,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
427 | originalRotations[objectGroup.UUID] = inventoryStoredRotation; | 427 | originalRotations[objectGroup.UUID] = inventoryStoredRotation; |
428 | 428 | ||
429 | // Restore attachment data after trip through the sim | 429 | // Restore attachment data after trip through the sim |
430 | if (objectGroup.RootPart.AttachPoint > 0) | 430 | if (objectGroup.AttachmentPoint > 0) |
431 | { | 431 | { |
432 | inventoryStoredPosition = objectGroup.RootPart.AttachedPos; | 432 | inventoryStoredPosition = objectGroup.RootPart.AttachedPos; |
433 | inventoryStoredRotation = objectGroup.RootPart.AttachRotation; | 433 | inventoryStoredRotation = objectGroup.RootPart.AttachRotation; |
434 | } | 434 | if (objectGroup.RootPart.Shape.PCode != (byte) PCode.Tree && |
435 | objectGroup.RootPart.Shape.PCode != (byte) PCode.NewTree) | ||
436 | objectGroup.RootPart.Shape.LastAttachPoint = (byte)objectGroup.AttachmentPoint; | ||
435 | 437 | ||
436 | // Trees could be attached and it's been done, but it makes | ||
437 | // no sense. State must be preserved because it's the tree type | ||
438 | if (objectGroup.RootPart.Shape.PCode != (byte) PCode.Tree && | ||
439 | objectGroup.RootPart.Shape.PCode != (byte) PCode.NewTree) | ||
440 | { | ||
441 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | ||
442 | if (objectGroup.RootPart.AttachPoint > 0) | ||
443 | objectGroup.RootPart.Shape.LastAttachPoint = objectGroup.RootPart.AttachPoint; | ||
444 | } | 438 | } |
445 | 439 | ||
446 | objectGroup.AbsolutePosition = inventoryStoredPosition; | 440 | objectGroup.AbsolutePosition = inventoryStoredPosition; |
@@ -1139,8 +1133,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
1139 | foreach (SceneObjectPart part in so.Parts) | 1133 | foreach (SceneObjectPart part in so.Parts) |
1140 | { | 1134 | { |
1141 | part.GroupMask = 0; // DO NOT propagate here | 1135 | part.GroupMask = 0; // DO NOT propagate here |
1142 | 1136 | if( part.OwnerID != part.GroupID) | |
1143 | part.LastOwnerID = part.OwnerID; | 1137 | part.LastOwnerID = part.OwnerID; |
1144 | part.OwnerID = item.Owner; | 1138 | part.OwnerID = item.Owner; |
1145 | part.RezzerID = item.Owner; | 1139 | part.RezzerID = item.Owner; |
1146 | part.Inventory.ChangeInventoryOwner(item.Owner); | 1140 | part.Inventory.ChangeInventoryOwner(item.Owner); |
@@ -1180,6 +1174,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
1180 | part.NextOwnerMask = item.NextPermissions & part.BaseMask; | 1174 | part.NextOwnerMask = item.NextPermissions & part.BaseMask; |
1181 | } | 1175 | } |
1182 | } | 1176 | } |
1177 | |||
1183 | } | 1178 | } |
1184 | } | 1179 | } |
1185 | else | 1180 | else |
@@ -1198,6 +1193,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
1198 | } | 1193 | } |
1199 | 1194 | ||
1200 | rootPart.TrimPermissions(); | 1195 | rootPart.TrimPermissions(); |
1196 | so.AggregateDeepPerms(); | ||
1201 | 1197 | ||
1202 | if (isAttachment) | 1198 | if (isAttachment) |
1203 | so.FromItemID = item.ID; | 1199 | so.FromItemID = item.ID; |