From 33ac0653a34a22c6e41644d1fe834ca1ec206362 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 11 Nov 2007 04:44:52 +0000 Subject: fixed chatting while sitting --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 608efc3..76d307f 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -546,11 +546,12 @@ namespace OpenSim.Region.Environment.Scenes if (m_parentID != 0) { SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); - LLVector3 pos = new LLVector3(); if (part != null) - pos = part.AbsolutePosition + m_requestedSitOffset + - new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); - MakeRootAgent(pos, false); + AbsolutePosition = part.AbsolutePosition + m_requestedSitOffset + + new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); + + AddToPhysicalScene(); + m_parentID = 0; SendFullUpdateToAllClients(); } @@ -623,7 +624,10 @@ namespace OpenSim.Region.Environment.Scenes AbsolutePosition = m_requestedSitOffset + new LLVector3(m_physicsActor.Size.X/2.7f, 0f, m_physicsActor.Size.Z/1.45f); m_parentID = m_requestedSitTargetID; - MakeChildAgent(); + + Velocity = new LLVector3(0, 0, 0); + RemoveFromPhysicalScene(); + SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); SendFullUpdateToAllClients(); } -- cgit v1.1