From 74ba1bb18098325dc411dcbf2d30a6f727872e9f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 17 Nov 2008 00:28:47 +0000 Subject: Fix child prims in attachments chatting from near 0,0,0 rather than the avatar position. Fixes "silent" child prim scripts --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index acec921..06a7512 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -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; } -- cgit v1.1