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).
This commit is contained in:
Homer Horwitz
2008-09-13 18:42:09 +00:00
parent 91e3463582
commit ae9e4e8144
2 changed files with 16 additions and 0 deletions

View File

@@ -498,6 +498,17 @@ namespace OpenSim.Region.Environment.Scenes
Console.WriteLine(e.Message);
}
}
// 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();
}
}
}
}
}