From f3ea2bde617fa6c55b89973cdea2fb8e217d83bd Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 23 Feb 2012 20:32:35 +0100 Subject: Fix preserving the animation state of a crossing seated avatar --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2c118d6..06da741 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -874,6 +874,8 @@ namespace OpenSim.Region.Framework.Scenes "[SCENE]: Upgrading child to root agent for {0} in {1}", Name, m_scene.RegionInfo.RegionName); + bool wasChild = IsChildAgent; + if (ParentUUID != UUID.Zero) { m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID); @@ -893,10 +895,16 @@ namespace OpenSim.Region.Framework.Scenes pos = ParentPosition; } ParentUUID = UUID.Zero; + + IsChildAgent = false; + + Animator.TrySetMovementAnimation("SIT"); + } + else + { + IsChildAgent = false; } - bool wasChild = IsChildAgent; - IsChildAgent = false; IGroupsModule gm = m_scene.RequestModuleInterface(); if (gm != null) -- cgit v1.1