aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorMelanie2010-03-03 02:07:03 +0000
committerMelanie2010-03-03 02:07:03 +0000
commit028a87fe37002e7a0611f66babf1deee46c83804 (patch)
tree387aec499fd60c2012bed8148e6a2ddc847c3d95 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentRevert "test" (diff)
parentFixes Region.Framework tests. Although these tests don't fail, they need to b... (diff)
downloadopensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.zip
opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.gz
opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.bz2
opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.xz
Merge branch 'master' into careminster-presence-refactor
This brings careminster on the level of master. To be tested
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs43
1 files changed, 26 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 2c66719..928dc97 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{
@@ -476,6 +477,15 @@ namespace OpenSim.Region.Framework.Scenes
476 part.Undo(); 477 part.Undo();
477 } 478 }
478 } 479 }
480 protected internal void HandleRedo(IClientAPI remoteClient, UUID primId)
481 {
482 if (primId != UUID.Zero)
483 {
484 SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
485 if (part != null)
486 part.Redo();
487 }
488 }
479 489
480 protected internal void HandleObjectGroupUpdate( 490 protected internal void HandleObjectGroupUpdate(
481 IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage) 491 IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
@@ -532,33 +542,32 @@ namespace OpenSim.Region.Framework.Scenes
532 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> 542 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
533 public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 543 public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
534 { 544 {
535 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, 545 IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface<IInventoryAccessModule>();
536 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, 546 if (invAccess != null)
537 false, false, remoteClient.AgentId, true);
538
539 if (objatt != null)
540 { 547 {
541 bool tainted = false; 548 SceneObjectGroup objatt = invAccess.RezObject(remoteClient,
542 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) 549 itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
543 tainted = true; 550 false, false, remoteClient.AgentId, true);
544 551
545 if (AttachObject( 552
546 remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false)) 553 if (objatt != null)
547 { 554 {
555 bool tainted = false;
556 if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
557 tainted = true;
558
559 AttachObject(remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
548 objatt.ScheduleGroupForFullUpdate(); 560 objatt.ScheduleGroupForFullUpdate();
549 if (tainted) 561 if (tainted)
550 objatt.HasGroupChanged = true; 562 objatt.HasGroupChanged = true;
551 563
552 // Fire after attach, so we don't get messy perms dialogs 564 // Fire after attach, so we don't get messy perms dialogs
553 // 3 == AttachedRez 565 // 3 == AttachedRez
554 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); 566 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
555
556 // Do this last so that event listeners have access to all the effects of the attachment
557 m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
558 } 567 }
568 return objatt;
559 } 569 }
560 570 return null;
561 return objatt;
562 } 571 }
563 572
564 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. 573 // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards.
@@ -669,7 +678,7 @@ namespace OpenSim.Region.Framework.Scenes
669 // it get cleaned up 678 // it get cleaned up
670 // 679 //
671 group.RootPart.RemFlag(PrimFlags.TemporaryOnRez); 680 group.RootPart.RemFlag(PrimFlags.TemporaryOnRez);
672 group.HasGroupChanged = false; 681 group.HasGroupChanged = false;
673 } 682 }
674 else 683 else
675 { 684 {