* added ForEachPart helper

* added SetOwnerId that... sets.. OwnerId... on all parts.
ThreadPoolClientBranch
lbsa71 2008-01-17 09:32:02 +00:00
parent c2863df49d
commit 344b4d92f5
1 changed files with 16 additions and 2 deletions

View File

@ -1667,9 +1667,9 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (m_parts.Count > 1) if (m_parts.Count > 1)
{ {
foreach (SceneObjectPart parts in m_parts.Values) foreach (SceneObjectPart part in m_parts.Values)
{ {
parts.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); part.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim);
// Hack to get the physics scene geometries in the right spot // Hack to get the physics scene geometries in the right spot
ResetChildPrimPhysicsPositions(); ResetChildPrimPhysicsPositions();
@ -1681,5 +1681,19 @@ namespace OpenSim.Region.Environment.Scenes
m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim); m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_physicalPrim);
} }
} }
public void SetOwnerId(LLUUID userId)
{
ForEachPart(delegate(SceneObjectPart part)
{ part.OwnerID = userId; });
}
public void ForEachPart(Action<SceneObjectPart> whatToDo)
{
foreach (SceneObjectPart part in m_parts.Values)
{
whatToDo(part);
}
}
} }
} }