From e6c71d6df6ef0f2836323c8ae2e59da2d1104f74 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 30 Dec 2009 15:55:49 -0500 Subject: * Fixes Sitting on the ground. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4c2de27..277081a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes private Vector3? m_forceToApply; private uint m_requestedSitTargetID; private UUID m_requestedSitTargetUUID; + public bool SitGround = false; private SendCourseLocationsMethod m_sendCourseLocationsMethod; @@ -1254,7 +1255,9 @@ namespace OpenSim.Region.Framework.Scenes // TODO: This doesn't prevent the user from walking yet. // Setting parent ID would fix this, if we knew what value // to use. Or we could add a m_isSitting variable. - Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); + //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); + SitGround = true; + } // In the future, these values might need to go global. @@ -1495,7 +1498,7 @@ namespace OpenSim.Region.Framework.Scenes } } - if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0)) + if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0) && !SitGround) Animator.UpdateMovementAnimations(); m_scene.EventManager.TriggerOnClientMovement(this); @@ -1607,8 +1610,12 @@ namespace OpenSim.Region.Framework.Scenes /// public void StandUp() { + if (SitGround) + SitGround = false; + if (m_parentID != 0) { + m_log.Debug("StandupCode Executed"); SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); if (part != null) { -- cgit v1.1