aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 321cc45..369552f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -35,6 +35,7 @@ using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Framework.Scenes.Types; 36using OpenSim.Region.Framework.Scenes.Types;
37using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
38using OpenSim.Region.Framework.Interfaces;
38 39
39namespace OpenSim.Region.Framework.Scenes 40namespace OpenSim.Region.Framework.Scenes
40{ 41{
@@ -517,33 +518,32 @@ namespace OpenSim.Region.Framework.Scenes
517 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> 518 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
518 public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 519 public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
519 { 520 {
520 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, 521 IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface<IInventoryAccessModule>();
521 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 522 if (invAccess != null)
522 false, false, remoteClient.AgentId, true);
523
524 if (objatt != null)
525 { 523 {
526 bool tainted = false; 524 SceneObjectGroup objatt = invAccess.RezObject(remoteClient,
527 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) 525 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
528 tainted = true; 526 false, false, remoteClient.AgentId, true);
527
529 528
530 if (AttachObject( 529 if (objatt != null)
531 remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false))
532 { 530 {
531 bool tainted = false;
532 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
533 tainted = true;
534
535 AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
533 objatt.ScheduleGroupForFullUpdate(); 536 objatt.ScheduleGroupForFullUpdate();
534 if (tainted) 537 if (tainted)
535 objatt.HasGroupChanged = true; 538 objatt.HasGroupChanged = true;
536 539
537 // Fire after attach, so we don't get messy perms dialogs 540 // Fire after attach, so we don't get messy perms dialogs
538 // 3 == AttachedRez 541 // 3 == AttachedRez
539 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); 542 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
540
541 // Do this last so that event listeners have access to all the effects of the attachment
542 m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
543 } 543 }
544 return objatt;
544 } 545 }
545 546 return null;
546 return objatt;
547 } 547 }
548 548
549 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. 549 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards.