aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs40
1 files changed, 23 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index f74fd5d..fbd11c6 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{
@@ -498,27 +499,32 @@ namespace OpenSim.Region.Framework.Scenes
498 public SceneObjectGroup RezSingleAttachment( 499 public SceneObjectGroup RezSingleAttachment(
499 IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 500 IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
500 { 501 {
501 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, 502 IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface<IInventoryAccessModule>();
502 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 503 if (invAccess != null)
503 false, false, remoteClient.AgentId, true);
504
505
506 if (objatt != null)
507 { 504 {
508 bool tainted = false; 505 SceneObjectGroup objatt = invAccess.RezObject(remoteClient,
509 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) 506 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
510 tainted = true; 507 false, false, remoteClient.AgentId, true);
511 508
512 AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
513 objatt.ScheduleGroupForFullUpdate();
514 if (tainted)
515 objatt.HasGroupChanged = true;
516 509
517 // Fire after attach, so we don't get messy perms dialogs 510 if (objatt != null)
518 // 3 == AttachedRez 511 {
519 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); 512 bool tainted = false;
513 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
514 tainted = true;
515
516 AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
517 objatt.ScheduleGroupForFullUpdate();
518 if (tainted)
519 objatt.HasGroupChanged = true;
520
521 // Fire after attach, so we don't get messy perms dialogs
522 // 3 == AttachedRez
523 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
524 }
525 return objatt;
520 } 526 }
521 return objatt; 527 return null;
522 } 528 }
523 529
524 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. 530 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards.