mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
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.
This commit is contained in:
@@ -338,6 +338,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return m_parts.ContainsKey(partID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this group contain the given part?
|
||||
/// should be able to remove these methods once we have a entity index in scene
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns></returns>
|
||||
public bool ContainsPart(uint localID)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
if (parts[i].LocalId == localID)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <value>
|
||||
/// The root part of this scene object
|
||||
/// </value>
|
||||
@@ -1911,35 +1929,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this group contain the child prim
|
||||
/// should be able to remove these methods once we have a entity index in scene
|
||||
/// </summary>
|
||||
/// <param name="primID"></param>
|
||||
/// <returns></returns>
|
||||
public bool HasChildPrim(UUID primID)
|
||||
{
|
||||
return m_parts.ContainsKey(primID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does this group contain the child prim
|
||||
/// should be able to remove these methods once we have a entity index in scene
|
||||
/// </summary>
|
||||
/// <param name="localID"></param>
|
||||
/// <returns></returns>
|
||||
public bool HasChildPrim(uint localID)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
if (parts[i].LocalId == localID)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Packet Handlers
|
||||
|
||||
Reference in New Issue
Block a user