Update avatar-position while avatar is sitting and the prim is moved (#2159).
I decided to make ParentPosition a public property in ScenePresence, because that's exactly what happens (the parent position changes on prim move).0.6.0-stable
parent
91e3463582
commit
ae9e4e8144
|
@ -499,6 +499,17 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
// TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
|
||||
if(m_sitTargetAvatar != UUID.Zero) {
|
||||
if (m_parentGroup != null) // TODO can there be a SOP without a SOG?
|
||||
{
|
||||
ScenePresence avatar;
|
||||
if(m_parentGroup.Scene.TryGetAvatar(m_sitTargetAvatar, out avatar)) {
|
||||
avatar.ParentPosition = GetWorldPosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -287,6 +287,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
protected Vector3 m_parentPosition = new Vector3();
|
||||
public Vector3 ParentPosition
|
||||
{
|
||||
get { return m_parentPosition; }
|
||||
set { m_parentPosition = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Absolute position of this avatar in 'region cordinates'
|
||||
|
|
Loading…
Reference in New Issue