aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs30
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs7
2 files changed, 34 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 19213fd..ca3b858 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -895,6 +895,7 @@ namespace OpenSim.Region.Environment.Scenes
895 // be more efficient yet to keep this dictionary permanently on hand. 895 // be more efficient yet to keep this dictionary permanently on hand.
896 896
897 Dictionary<uint, SceneObjectGroup> sceneObjects = new Dictionary<uint, SceneObjectGroup>(); 897 Dictionary<uint, SceneObjectGroup> sceneObjects = new Dictionary<uint, SceneObjectGroup>();
898
898 List<EntityBase> EntitieList = GetEntities(); 899 List<EntityBase> EntitieList = GetEntities();
899 foreach (EntityBase ent in EntitieList) 900 foreach (EntityBase ent in EntitieList)
900 { 901 {
@@ -902,14 +903,17 @@ namespace OpenSim.Region.Environment.Scenes
902 { 903 {
903 SceneObjectGroup obj = (SceneObjectGroup) ent; 904 SceneObjectGroup obj = (SceneObjectGroup) ent;
904 sceneObjects.Add(obj.LocalId, obj); 905 sceneObjects.Add(obj.LocalId, obj);
906
905 } 907 }
906 } 908 }
907 909
908 // Find the root prim among the prim ids we've been given 910 // Find the root prim among the prim ids we've been given
909 for (int i = 0; i < primIds.Count; i++) 911 for (int i = 0; i < primIds.Count; i++)
910 { 912 {
913
911 if (sceneObjects.ContainsKey(primIds[i])) 914 if (sceneObjects.ContainsKey(primIds[i]))
912 { 915 {
916
913 parenPrim = sceneObjects[primIds[i]]; 917 parenPrim = sceneObjects[primIds[i]];
914 primIds.RemoveAt(i); 918 primIds.RemoveAt(i);
915 break; 919 break;
@@ -925,9 +929,29 @@ namespace OpenSim.Region.Environment.Scenes
925 } 929 }
926 else 930 else
927 { 931 {
928 m_log.InfoFormat("[SCENE]: " + 932 // If the first scan failed, we need to do a /deep/ scan of the linkages. This is /really/ slow
929 "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", 933 // We know that this is not the root prim now essentially, so we don't have to worry about remapping
930 primIds); 934 // which one is the root prim
935 bool delinkedSomething = false;
936 for (int i = 0; i < primIds.Count; i++)
937 {
938 foreach (SceneObjectGroup grp in sceneObjects.Values)
939 {
940 SceneObjectPart gPart = grp.GetChildPart(primIds[i]);
941 if (gPart != null)
942 {
943 grp.DelinkFromGroup(primIds[i]);
944 delinkedSomething = true;
945 }
946
947 }
948 }
949 if (!delinkedSomething)
950 {
951 m_log.InfoFormat("[SCENE]: " +
952 "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!",
953 primIds);
954 }
931 } 955 }
932 } 956 }
933 957
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index a14d869..3cef65c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1218,6 +1218,13 @@ namespace OpenSim.Region.Environment.Scenes
1218 part.UpdateExtraParam(type, inUse, data); 1218 part.UpdateExtraParam(type, inUse, data);
1219 } 1219 }
1220 } 1220 }
1221 public SceneObjectPart[] GetParts()
1222 {
1223 int numParts = Children.Count;
1224 SceneObjectPart[] partArray = new SceneObjectPart[numParts];
1225 Children.Values.CopyTo(partArray, 0);
1226 return partArray;
1227 }
1221 public bool GetLocked() 1228 public bool GetLocked()
1222 { 1229 {
1223 return m_locked; 1230 return m_locked;