aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs47
2 files changed, 21 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 5c542d6..cd1366c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -860,7 +860,7 @@ namespace OpenSim.Region.Framework.Scenes
860 860
861 if (sog != null) 861 if (sog != null)
862 { 862 {
863 if (sog.HasChildPrim(localID)) 863 if (sog.ContainsPart(localID))
864 { 864 {
865// m_log.DebugFormat( 865// m_log.DebugFormat(
866// "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.", 866// "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.",
@@ -888,7 +888,7 @@ namespace OpenSim.Region.Framework.Scenes
888 if (ent is SceneObjectGroup) 888 if (ent is SceneObjectGroup)
889 { 889 {
890 sog = (SceneObjectGroup)ent; 890 sog = (SceneObjectGroup)ent;
891 if (sog.HasChildPrim(localID)) 891 if (sog.ContainsPart(localID))
892 { 892 {
893 lock (SceneObjectGroupsByLocalPartID) 893 lock (SceneObjectGroupsByLocalPartID)
894 SceneObjectGroupsByLocalPartID[localID] = sog; 894 SceneObjectGroupsByLocalPartID[localID] = sog;
@@ -926,7 +926,7 @@ namespace OpenSim.Region.Framework.Scenes
926 if (ent is SceneObjectGroup) 926 if (ent is SceneObjectGroup)
927 { 927 {
928 sog = (SceneObjectGroup)ent; 928 sog = (SceneObjectGroup)ent;
929 if (sog.HasChildPrim(fullID)) 929 if (sog.ContainsPart(fullID))
930 { 930 {
931 lock (SceneObjectGroupsByFullPartID) 931 lock (SceneObjectGroupsByFullPartID)
932 SceneObjectGroupsByFullPartID[fullID] = sog; 932 SceneObjectGroupsByFullPartID[fullID] = sog;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index afb5ccf..9d16beb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -338,6 +338,24 @@ namespace OpenSim.Region.Framework.Scenes
338 return m_parts.ContainsKey(partID); 338 return m_parts.ContainsKey(partID);
339 } 339 }
340 340
341 /// <summary>
342 /// Does this group contain the given part?
343 /// should be able to remove these methods once we have a entity index in scene
344 /// </summary>
345 /// <param name="localID"></param>
346 /// <returns></returns>
347 public bool ContainsPart(uint localID)
348 {
349 SceneObjectPart[] parts = m_parts.GetArray();
350 for (int i = 0; i < parts.Length; i++)
351 {
352 if (parts[i].LocalId == localID)
353 return true;
354 }
355
356 return false;
357 }
358
341 /// <value> 359 /// <value>
342 /// The root part of this scene object 360 /// The root part of this scene object
343 /// </value> 361 /// </value>
@@ -1911,35 +1929,6 @@ namespace OpenSim.Region.Framework.Scenes
1911 return null; 1929 return null;
1912 } 1930 }
1913 1931
1914 /// <summary>
1915 /// Does this group contain the child prim
1916 /// should be able to remove these methods once we have a entity index in scene
1917 /// </summary>
1918 /// <param name="primID"></param>
1919 /// <returns></returns>
1920 public bool HasChildPrim(UUID primID)
1921 {
1922 return m_parts.ContainsKey(primID);
1923 }
1924
1925 /// <summary>
1926 /// Does this group contain the child prim
1927 /// should be able to remove these methods once we have a entity index in scene
1928 /// </summary>
1929 /// <param name="localID"></param>
1930 /// <returns></returns>
1931 public bool HasChildPrim(uint localID)
1932 {
1933 SceneObjectPart[] parts = m_parts.GetArray();
1934 for (int i = 0; i < parts.Length; i++)
1935 {
1936 if (parts[i].LocalId == localID)
1937 return true;
1938 }
1939
1940 return false;
1941 }
1942
1943 #endregion 1932 #endregion
1944 1933
1945 #region Packet Handlers 1934 #region Packet Handlers