diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index daf1b5e..a7eb0b7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -424,12 +424,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
424 | m_groupPosition.Y = PhysActor.Position.Y; | 424 | m_groupPosition.Y = PhysActor.Position.Y; |
425 | m_groupPosition.Z = PhysActor.Position.Z; | 425 | m_groupPosition.Z = PhysActor.Position.Z; |
426 | } | 426 | } |
427 | if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment) | 427 | if (IsAttachment) |
428 | { | 428 | { |
429 | ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.RootPart.AttachedAvatar); | 429 | if (m_parentGroup != null && m_parentGroup.RootPart != null) |
430 | if (sp != null) | ||
431 | { | 430 | { |
432 | return sp.AbsolutePosition; | 431 | ScenePresence sp = m_parentGroup.Scene.GetScenePresence(m_parentGroup.RootPart.AttachedAvatar); |
432 | if (sp != null) | ||
433 | { | ||
434 | return sp.AbsolutePosition; | ||
435 | } | ||
433 | } | 436 | } |
434 | } | 437 | } |
435 | 438 | ||
@@ -743,7 +746,7 @@ if (m_shape != null) { | |||
743 | public Vector3 AbsolutePosition | 746 | public Vector3 AbsolutePosition |
744 | { | 747 | { |
745 | get { | 748 | get { |
746 | if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment) | 749 | if (IsAttachment) |
747 | return GroupPosition; | 750 | return GroupPosition; |
748 | 751 | ||
749 | return m_offsetPosition + m_groupPosition; } | 752 | return m_offsetPosition + m_groupPosition; } |