Remove a race condition from SP.Set_AbsolutePosition where we assume the ParentPart is still not null if the ParentID != 0
Another thread could come in and stand the avatar between those two instructions.0.7.4.1
parent
42a7a85062
commit
73c47f7205
|
@ -455,12 +455,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// in the sim unless the avatar is on a sit target. While
|
// in the sim unless the avatar is on a sit target. While
|
||||||
// on a sit target, m_pos will contain the desired offset
|
// on a sit target, m_pos will contain the desired offset
|
||||||
// without the parent rotation applied.
|
// without the parent rotation applied.
|
||||||
if (ParentID != 0)
|
SceneObjectPart sitPart = ParentPart;
|
||||||
{
|
|
||||||
SceneObjectPart part = ParentPart;
|
if (sitPart != null)
|
||||||
return part.AbsolutePosition + (m_pos * part.GetWorldRotation());
|
return sitPart.AbsolutePosition + (m_pos * sitPart.GetWorldRotation());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_pos;
|
return m_pos;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
|
|
Loading…
Reference in New Issue