Hold a ref to the prim we're sat on rather than querying scene each time
the check for significant is carried out. Prevents a deadlock condition.avinationmerge
parent
3d3b81e676
commit
b8c27252c1
|
@ -527,16 +527,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// without the parent rotation applied.
|
// without the parent rotation applied.
|
||||||
if (ParentID != 0)
|
if (ParentID != 0)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = m_scene.GetSceneObjectPart(ParentID);
|
SceneObjectPart part = ParentPart;
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
return part.AbsolutePosition + (m_pos * part.GetWorldRotation());
|
return part.AbsolutePosition + (m_pos * part.GetWorldRotation());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return ParentPosition + m_pos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return m_pos;
|
return m_pos;
|
||||||
}
|
}
|
||||||
|
@ -653,6 +646,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
private UUID m_parentUUID = UUID.Zero;
|
private UUID m_parentUUID = UUID.Zero;
|
||||||
|
|
||||||
|
public SceneObjectPart ParentPart
|
||||||
|
{
|
||||||
|
get { return m_parentPart; }
|
||||||
|
set { m_parentPart = value; }
|
||||||
|
}
|
||||||
|
private SceneObjectPart m_parentPart = null;
|
||||||
|
|
||||||
public float Health
|
public float Health
|
||||||
{
|
{
|
||||||
get { return m_health; }
|
get { return m_health; }
|
||||||
|
@ -891,6 +891,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.SitTargetAvatar = UUID;
|
part.SitTargetAvatar = UUID;
|
||||||
ParentPosition = part.GetWorldPosition();
|
ParentPosition = part.GetWorldPosition();
|
||||||
ParentID = part.LocalId;
|
ParentID = part.LocalId;
|
||||||
|
ParentPart = part;
|
||||||
m_pos = m_prevSitOffset;
|
m_pos = m_prevSitOffset;
|
||||||
pos = ParentPosition;
|
pos = ParentPosition;
|
||||||
}
|
}
|
||||||
|
@ -1865,9 +1866,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (ParentID != 0)
|
if (ParentID != 0)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = m_scene.GetSceneObjectPart(ParentID);
|
SceneObjectPart part = ParentPart;
|
||||||
if (part != null)
|
|
||||||
{
|
|
||||||
TaskInventoryDictionary taskIDict = part.TaskInventory;
|
TaskInventoryDictionary taskIDict = part.TaskInventory;
|
||||||
if (taskIDict != null)
|
if (taskIDict != null)
|
||||||
{
|
{
|
||||||
|
@ -1890,12 +1889,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
part.ParentGroup.DeleteAvatar(UUID);
|
part.ParentGroup.DeleteAvatar(UUID);
|
||||||
ParentPosition = part.GetWorldPosition();
|
ParentPosition = part.GetWorldPosition();
|
||||||
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
||||||
}
|
|
||||||
|
|
||||||
m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight);
|
m_pos += ParentPosition + new Vector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight);
|
||||||
ParentPosition = Vector3.Zero;
|
ParentPosition = Vector3.Zero;
|
||||||
|
|
||||||
ParentID = 0;
|
ParentID = 0;
|
||||||
|
ParentPart = null;
|
||||||
|
|
||||||
if (PhysicsActor == null)
|
if (PhysicsActor == null)
|
||||||
AddToPhysicalScene(false);
|
AddToPhysicalScene(false);
|
||||||
|
@ -2356,6 +2355,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ParentPart = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
|
||||||
|
if (ParentPart == null)
|
||||||
|
return;
|
||||||
|
|
||||||
ParentID = m_requestedSitTargetID;
|
ParentID = m_requestedSitTargetID;
|
||||||
|
|
||||||
Velocity = Vector3.Zero;
|
Velocity = Vector3.Zero;
|
||||||
|
|
Loading…
Reference in New Issue