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. --- .../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 5 ++++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 8b1d705..fd526eb 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -146,7 +146,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation const float PREJUMP_DELAY = 0.25f; #region Inputs - + if (m_scenePresence.SitGround) + { + return "SIT_GROUND_CONSTRAINED"; + } AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags; PhysicsActor actor = m_scenePresence.PhysicsActor; 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