diff options
author | Justin Clark-Casey (justincc) | 2012-03-31 01:45:37 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-31 01:45:37 +0100 |
commit | f0406f9fe2f7a1d4d135934280735a3fdc41935f (patch) | |
tree | e6193662a8b1a8ea4cda9477f64ec5793941e3d1 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Allow llRegionSayTo() to work on the PUBLIC_CHANNEL, as per http://wiki.secon... (diff) | |
download | opensim-SC_OLD-f0406f9fe2f7a1d4d135934280735a3fdc41935f.zip opensim-SC_OLD-f0406f9fe2f7a1d4d135934280735a3fdc41935f.tar.gz opensim-SC_OLD-f0406f9fe2f7a1d4d135934280735a3fdc41935f.tar.bz2 opensim-SC_OLD-f0406f9fe2f7a1d4d135934280735a3fdc41935f.tar.xz |
Rename SOG.HasChildPrim(uint) to SOG.ContainsPart(uint) to match existing ContainsPart method and remove method duplication.
HasChildPrim is also misleading since the 'root' prim can also be returned.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 47 |
1 files changed, 18 insertions, 29 deletions
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 |