diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index f58f334..65fa544 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -418,8 +418,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
418 | /// <param name="rot"></param> | 418 | /// <param name="rot"></param> |
419 | protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot) | 419 | protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot) |
420 | { | 420 | { |
421 | // Calls attach with a Zero position | 421 | // If we can't take it, we can't attach it! |
422 | // | ||
423 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(objectLocalID); | ||
424 | if (part == null) | ||
425 | return; | ||
422 | 426 | ||
427 | if (!m_parentScene.ExternalChecks.ExternalChecksCanTakeObject( | ||
428 | part.UUID, remoteClient.AgentId)) | ||
429 | return; | ||
430 | |||
431 | // Calls attach with a Zero position | ||
432 | // | ||
423 | AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero); | 433 | AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero); |
424 | } | 434 | } |
425 | 435 | ||
@@ -431,6 +441,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), | 441 | (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), |
432 | (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), | 442 | (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer), |
433 | ItemFlags, false, false, remoteClient.AgentId, true); | 443 | ItemFlags, false, false, remoteClient.AgentId, true); |
444 | objatt.SetAttachmentPoint(Convert.ToByte(AttachmentPt)); | ||
434 | 445 | ||
435 | if (objatt != null) | 446 | if (objatt != null) |
436 | { | 447 | { |
@@ -514,7 +525,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
514 | UUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId); | 525 | UUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId); |
515 | 526 | ||
516 | // sets assetID so client can show asset as 'attached' in inventory | 527 | // sets assetID so client can show asset as 'attached' in inventory |
517 | group.SetFromAssetID(newAssetID); | ||
518 | } | 528 | } |
519 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos); | 529 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos); |
520 | // In case it is later dropped again, don't let | 530 | // In case it is later dropped again, don't let |