Fix child prims in attachments chatting from near 0,0,0 rather than

the avatar position. Fixes "silent" child prim scripts
0.6.1-post-fixes
Melanie Thielker 2008-11-17 00:28:47 +00:00
parent 4343ddeec1
commit 74ba1bb180
1 changed files with 3 additions and 3 deletions

View File

@ -424,9 +424,9 @@ namespace OpenSim.Region.Environment.Scenes
m_groupPosition.Y = PhysActor.Position.Y;
m_groupPosition.Z = PhysActor.Position.Z;
}
if (IsAttachment)
if (ParentGroup.RootPart.IsAttachment)
{
ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar);
ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.RootPart.AttachedAvatar);
if (sp != null)
{
return sp.AbsolutePosition;
@ -743,7 +743,7 @@ if (m_shape != null) {
public Vector3 AbsolutePosition
{
get {
if (IsAttachment)
if (ParentGroup.RootPart.IsAttachment)
return GroupPosition;
return m_offsetPosition + m_groupPosition; }