aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs30
1 files changed, 16 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 1625e80..1f3bc95 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Scenes
119 { 119 {
120 if (((SceneObjectGroup)obj).LocalId == localID) 120 if (((SceneObjectGroup)obj).LocalId == localID)
121 { 121 {
122 m_parentScene.RemoveEntity((SceneObjectGroup)obj); 122 m_parentScene.RemoveEntity((SceneObjectGroup)obj);
123 return; 123 return;
124 } 124 }
125 } 125 }
@@ -553,7 +553,7 @@ namespace OpenSim.Region.Environment.Scenes
553 parenPrim.LinkToGroup(sceneObj); 553 parenPrim.LinkToGroup(sceneObj);
554 } 554 }
555 } 555 }
556 556
557 /// <summary> 557 /// <summary>
558 /// Delink a linkset 558 /// Delink a linkset
559 /// </summary> 559 /// </summary>
@@ -568,7 +568,7 @@ namespace OpenSim.Region.Environment.Scenes
568 // XXX I'm anticipating that building this dictionary once is more efficient than 568 // XXX I'm anticipating that building this dictionary once is more efficient than
569 // repeated scanning of the Entity.Values for a large number of primIds. However, it might 569 // repeated scanning of the Entity.Values for a large number of primIds. However, it might
570 // be more efficient yet to keep this dictionary permanently on hand. 570 // be more efficient yet to keep this dictionary permanently on hand.
571 Dictionary<uint, SceneObjectGroup> sceneObjects = new Dictionary<uint, SceneObjectGroup>(); 571 Dictionary<uint, SceneObjectGroup> sceneObjects = new Dictionary<uint, SceneObjectGroup>();
572 foreach (EntityBase ent in Entities.Values) 572 foreach (EntityBase ent in Entities.Values)
573 { 573 {
574 if (ent is SceneObjectGroup) 574 if (ent is SceneObjectGroup)
@@ -576,17 +576,17 @@ namespace OpenSim.Region.Environment.Scenes
576 SceneObjectGroup obj = (SceneObjectGroup)ent; 576 SceneObjectGroup obj = (SceneObjectGroup)ent;
577 sceneObjects.Add(obj.LocalId, obj); 577 sceneObjects.Add(obj.LocalId, obj);
578 } 578 }
579 } 579 }
580 580
581 // Find the root prim among the prim ids we've been given 581 // Find the root prim among the prim ids we've been given
582 for (int i = 0; i < primIds.Count; i++) 582 for (int i = 0; i < primIds.Count; i++)
583 { 583 {
584 if (sceneObjects.ContainsKey(primIds[i])) 584 if (sceneObjects.ContainsKey(primIds[i]))
585 { 585 {
586 parenPrim = sceneObjects[primIds[i]]; 586 parenPrim = sceneObjects[primIds[i]];
587 primIds.RemoveAt(i); 587 primIds.RemoveAt(i);
588 break; 588 break;
589 } 589 }
590 } 590 }
591 591
592 if (parenPrim != null) 592 if (parenPrim != null)
@@ -594,7 +594,7 @@ namespace OpenSim.Region.Environment.Scenes
594 foreach (uint childPrimId in primIds) 594 foreach (uint childPrimId in primIds)
595 { 595 {
596 parenPrim.DelinkFromGroup(childPrimId); 596 parenPrim.DelinkFromGroup(childPrimId);
597 } 597 }
598 } 598 }
599 else 599 else
600 { 600 {
@@ -627,19 +627,21 @@ namespace OpenSim.Region.Environment.Scenes
627 627
628 if (originPrim != null) 628 if (originPrim != null)
629 { 629 {
630 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID); 630 if (PermissionsMngr.CanCopyObject(AgentID, originPrim.UUID))
631 copy.AbsolutePosition = copy.AbsolutePosition + offset; 631 {
632 Entities.Add(copy.UUID, copy); 632 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID);
633 633 copy.AbsolutePosition = copy.AbsolutePosition + offset;
634 copy.ScheduleGroupForFullUpdate(); 634 Entities.Add(copy.UUID, copy);
635 635
636 copy.ScheduleGroupForFullUpdate();
637 }
636 } 638 }
637 else 639 else
638 { 640 {
639 MainLog.Instance.Warn("client", "Attempted to duplicate nonexistant prim"); 641 MainLog.Instance.Warn("client", "Attempted to duplicate nonexistant prim");
640 } 642 }
641 }
642 643
644 }
643 645
644 #endregion 646 #endregion
645 } 647 }