mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
* added ForEachPart helper
* added SetOwnerId that... sets.. OwnerId... on all parts.
This commit is contained in:
@@ -1667,9 +1667,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
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
|
||||
ResetChildPrimPhysicsPositions();
|
||||
@@ -1681,5 +1681,19 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user