From 68a5fe04318fed4b306e8405861203c19a313a2f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Aug 2011 02:59:49 +0100 Subject: Improve z axis move to/autopilot so the avatar does alternative crouch/huzzah when walking along the ground Moving a flying avatar to a ground point doesn't yet land the avatar. This may or may not be the best thing --- .../Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Animation') diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 1334230..4ab818f 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -27,6 +27,8 @@ using System; using System.Collections.Generic; +using System.Reflection; +using log4net; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Interfaces; @@ -40,6 +42,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation /// public class ScenePresenceAnimator { +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public AnimationSet Animations { get { return m_animations; } @@ -262,7 +266,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation m_animTickFall = 0; - if (move.Z > 0f) + if (move.Z > 0.2f) { // Jumping if (!jumping) @@ -323,6 +327,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation public void UpdateMovementAnimations() { m_movementAnimation = GetMovementAnimation(); +// m_log.DebugFormat( +// "[SCENE PRESENCE ANIMATOR]: Got animation {0} for {1}", m_movementAnimation, m_scenePresence.Name); TrySetMovementAnimation(m_movementAnimation); } -- cgit v1.1