diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index cd5a9f5..3be1592 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -821,6 +821,32 @@ namespace OpenSim.Region.Environment.Scenes | |||
821 | else | 821 | else |
822 | return null; | 822 | return null; |
823 | } | 823 | } |
824 | |||
825 | /// <summary> | ||
826 | /// Get a named prim contained in this scene (will return the first | ||
827 | /// found, if there are more than one prim with the same name) | ||
828 | /// </summary> | ||
829 | /// <param name="name"></param> | ||
830 | /// <returns>null if the part was not found</returns> | ||
831 | protected internal SceneObjectPart GetSceneObjectPart(string name) | ||
832 | { | ||
833 | List<EntityBase> EntityList = GetEntities(); | ||
834 | |||
835 | foreach (EntityBase ent in EntityList) | ||
836 | { | ||
837 | if (ent is SceneObjectGroup) | ||
838 | { | ||
839 | foreach(SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) | ||
840 | { | ||
841 | if (p.Name==name) | ||
842 | { | ||
843 | return p; | ||
844 | } | ||
845 | } | ||
846 | } | ||
847 | } | ||
848 | return null; | ||
849 | } | ||
824 | 850 | ||
825 | /// <summary> | 851 | /// <summary> |
826 | /// Get a part contained in this scene. | 852 | /// Get a part contained in this scene. |