diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 30f3e04..ab2abed 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -1637,7 +1637,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
1637 | { | 1637 | { |
1638 | if (avatars[i] != this) | 1638 | if (avatars[i] != this) |
1639 | { | 1639 | { |
1640 | CoarseLocations.Add(avatars[i].m_pos); | 1640 | if (avatars[i].ParentID != 0) |
1641 | { | ||
1642 | // sitting avatar | ||
1643 | SceneObjectPart sop = m_scene.GetSceneObjectPart(avatars[i].ParentID); | ||
1644 | if (sop != null) | ||
1645 | { | ||
1646 | CoarseLocations.Add(sop.AbsolutePosition + avatars[i].m_pos); | ||
1647 | } | ||
1648 | else | ||
1649 | { | ||
1650 | // we can't find the parent.. ! arg! | ||
1651 | CoarseLocations.Add(avatars[i].m_pos); | ||
1652 | } | ||
1653 | } | ||
1654 | else | ||
1655 | { | ||
1656 | CoarseLocations.Add(avatars[i].m_pos); | ||
1657 | } | ||
1641 | } | 1658 | } |
1642 | } | 1659 | } |
1643 | 1660 | ||