From 283468caa08af3a38126fa407bcd472a8d45c0fb Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 22 Aug 2007 17:46:23 +0000 Subject: Added Scene.GetSceneObjectPart(uint localID) --- OpenSim/Region/Environment/Scenes/Scene.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 45bda63..62eb547 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1165,5 +1165,22 @@ namespace OpenSim.Region.Environment.Scenes } return LLUUID.Zero; } + + public SceneObjectPart GetSceneObjectPart(uint localID) + { + bool hasPrim = false; + foreach (EntityBase ent in Entities.Values) + { + if (ent is SceneObjectGroup) + { + hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); + if (hasPrim != false) + { + return ((SceneObjectGroup)ent).GetChildPart(localID); + } + } + } + return null; + } } } -- cgit v1.1