From 4402851b086e7faf0d441d2ae0d5f6a3e1ea04b8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 11 Aug 2011 01:56:42 +0100 Subject: Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) after finishing their movement. This also fixes judder after an avatar has finished "go here"/autopilot movement in a viewer. This meant reseting the SP.AgentControlFlags since the Animator uses these to determine the correct default animation. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++++++ 1 file changed, 6 insertions(+) (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 12a4712..7a30684 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1745,6 +1745,12 @@ namespace OpenSim.Region.Framework.Scenes MovingToTarget = false; MoveToPositionTarget = Vector3.Zero; + + // We need to reset the control flag as the ScenePresenceAnimator uses this to determine the correct + // resting animation (e.g. hover or stand). NPCs don't have a client that will quickly reset this flag. + // However, the line is here rather than in the NPC module since it also appears necessary to stop a + // viewer that uses "go here" from juddering on all subsequent avatar movements. + AgentControlFlags = (uint)AgentManager.ControlFlags.NONE; } private void CheckAtSitTarget() -- cgit v1.1