Report current position instead of position at the time we sat down

avinationmerge
Melanie Thielker 2010-06-14 00:02:17 +02:00
parent d520360cb8
commit 62763cc0fb
2 changed files with 8 additions and 1 deletions

View File

@ -4732,7 +4732,7 @@ namespace OpenSim.Region.Framework.Scenes
// Update sitting avatar chat position // Update sitting avatar chat position
p.AbsolutePosition = GroupPosition; p.AbsolutePosition = GroupPosition + OffsetPosition + m_sitTargetPosition;
} }
} }
} }

View File

@ -466,6 +466,13 @@ namespace OpenSim.Region.Framework.Scenes
if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting! if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting!
m_pos = actor.Position; m_pos = actor.Position;
// If we're sitting, we need to update our position
if (m_parentID == 0)
{
SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID);
m_parentPosition = part.AbsolutePosition;
}
return m_parentPosition + m_pos; return m_parentPosition + m_pos;
} }
set set