diff options
author | Melanie | 2011-10-25 00:53:39 +0200 |
---|---|---|
committer | Melanie | 2011-10-25 00:53:39 +0200 |
commit | 5f025d20fe9aa8449f446f33d9147ddb27e2d5be (patch) | |
tree | b7e5f10cb16a36faf0553e68a9b98fb49267428f /OpenSim/Region/Framework/Scenes/Animation | |
parent | Fake an AgentCircuitData if none is available rather than crashing out (diff) | |
download | opensim-SC-5f025d20fe9aa8449f446f33d9147ddb27e2d5be.zip opensim-SC-5f025d20fe9aa8449f446f33d9147ddb27e2d5be.tar.gz opensim-SC-5f025d20fe9aa8449f446f33d9147ddb27e2d5be.tar.bz2 opensim-SC-5f025d20fe9aa8449f446f33d9147ddb27e2d5be.tar.xz |
Fix ground sit autopilot
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index e4e5ab6..175e8ed 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Threading; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
@@ -169,6 +170,7 @@ TrySetMovementAnimation("STAND"); | |||
169 | #region Inputs | 170 | #region Inputs |
170 | 171 | ||
171 | AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags; | 172 | AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags; |
173 | // m_log.DebugFormat("[ANIM]: Control flags: {0}", controlFlags); | ||
172 | PhysicsActor actor = m_scenePresence.PhysicsActor; | 174 | PhysicsActor actor = m_scenePresence.PhysicsActor; |
173 | 175 | ||
174 | // Create forward and left vectors from the current avatar rotation | 176 | // Create forward and left vectors from the current avatar rotation |
@@ -190,12 +192,12 @@ TrySetMovementAnimation("STAND"); | |||
190 | 192 | ||
191 | // Direction in which the avatar is trying to move | 193 | // Direction in which the avatar is trying to move |
192 | Vector3 move = Vector3.Zero; | 194 | Vector3 move = Vector3.Zero; |
193 | if (heldForward) { move.X += fwd.X; move.Y += fwd.Y; } | ||
194 | if (heldBack) { move.X -= fwd.X; move.Y -= fwd.Y; } | 195 | if (heldBack) { move.X -= fwd.X; move.Y -= fwd.Y; } |
195 | if (heldLeft) { move.X += left.X; move.Y += left.Y; } | 196 | if (heldLeft) { move.X += left.X; move.Y += left.Y; } |
196 | if (heldRight) { move.X -= left.X; move.Y -= left.Y; } | 197 | if (heldRight) { move.X -= left.X; move.Y -= left.Y; } |
197 | if (heldUp) { move.Z += 1; } | 198 | if (heldUp) { move.Z += 1; } |
198 | if (heldDown) { move.Z -= 1; } | 199 | if (heldDown) { move.Z -= 1; } |
200 | if (heldForward) { move.X += fwd.X; move.Y += fwd.Y; } | ||
199 | 201 | ||
200 | // Is the avatar trying to move? | 202 | // Is the avatar trying to move? |
201 | // bool moving = (move != Vector3.Zero); | 203 | // bool moving = (move != Vector3.Zero); |