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 1ac061a..7bd4329 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{
@@ -508,33 +509,32 @@ namespace OpenSim.Region.Framework.Scenes
508 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> 509 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
509 public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 510 public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
510 { 511 {
511 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, 512 IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface<IInventoryAccessModule>();
512 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 513 if (invAccess != null)
513 false, false, remoteClient.AgentId, true);
514
515 if (objatt != null)
516 { 514 {
517 bool tainted = false; 515 SceneObjectGroup objatt = invAccess.RezObject(remoteClient,
518 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) 516 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
519 tainted = true; 517 false, false, remoteClient.AgentId, true);
518
520 519
521 if (AttachObject( 520 if (objatt != null)
522 remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false))
523 { 521 {
522 bool tainted = false;
523 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
524 tainted = true;
525
526 AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
524 objatt.ScheduleGroupForFullUpdate(); 527 objatt.ScheduleGroupForFullUpdate();
525 if (tainted) 528 if (tainted)
526 objatt.HasGroupChanged = true; 529 objatt.HasGroupChanged = true;
527 530
528 // Fire after attach, so we don't get messy perms dialogs 531 // Fire after attach, so we don't get messy perms dialogs
529 // 3 == AttachedRez 532 // 3 == AttachedRez
530 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); 533 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
531
532 // Do this last so that event listeners have access to all the effects of the attachment
533 m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
534 } 534 }
535 return objatt;
535 } 536 }
536 537 return null;
537 return objatt;
538 } 538 }
539 539
540 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. 540 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards.