mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user