aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c31cbab..6485710 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2351,6 +2351,11 @@ namespace OpenSim.Region.Framework.Scenes
2351 /// <param name="objectGroup">The group of prims which should be linked to this group</param> 2351 /// <param name="objectGroup">The group of prims which should be linked to this group</param>
2352 public void LinkToGroup(SceneObjectGroup objectGroup) 2352 public void LinkToGroup(SceneObjectGroup objectGroup)
2353 { 2353 {
2354 LinkToGroup(objectGroup, false);
2355 }
2356
2357 public void LinkToGroup(SceneObjectGroup objectGroup, bool insert)
2358 {
2354// m_log.DebugFormat( 2359// m_log.DebugFormat(
2355// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}", 2360// "[SCENE OBJECT GROUP]: Linking group with root part {0}, {1} to group with root part {2}, {3}",
2356// objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID); 2361// objectGroup.RootPart.Name, objectGroup.RootPart.UUID, RootPart.Name, RootPart.UUID);
@@ -2380,7 +2385,20 @@ namespace OpenSim.Region.Framework.Scenes
2380 2385
2381 lock (m_parts.SyncRoot) 2386 lock (m_parts.SyncRoot)
2382 { 2387 {
2383 int linkNum = PrimCount + 1; 2388 int linkNum;
2389 if (insert)
2390 {
2391 linkNum = 2;
2392 foreach (SceneObjectPart part in Parts)
2393 {
2394 if (part.LinkNum > 1)
2395 part.LinkNum++;
2396 }
2397 }
2398 else
2399 {
2400 linkNum = PrimCount + 1;
2401 }
2384 2402
2385 m_parts.Add(linkPart.UUID, linkPart); 2403 m_parts.Add(linkPart.UUID, linkPart);
2386 2404