Fix ground sit autopilot

This commit is contained in:
Melanie
2011-10-25 00:53:39 +02:00
parent 4a6160e7ad
commit 5f025d20fe
2 changed files with 19 additions and 9 deletions

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.Threading;
using System.Collections.Generic;
using System.Reflection;
using log4net;
@@ -169,6 +170,7 @@ TrySetMovementAnimation("STAND");
#region Inputs
AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags;
// m_log.DebugFormat("[ANIM]: Control flags: {0}", controlFlags);
PhysicsActor actor = m_scenePresence.PhysicsActor;
// Create forward and left vectors from the current avatar rotation
@@ -190,12 +192,12 @@ TrySetMovementAnimation("STAND");
// Direction in which the avatar is trying to move
Vector3 move = Vector3.Zero;
if (heldForward) { move.X += fwd.X; move.Y += fwd.Y; }
if (heldBack) { move.X -= fwd.X; move.Y -= fwd.Y; }
if (heldLeft) { move.X += left.X; move.Y += left.Y; }
if (heldRight) { move.X -= left.X; move.Y -= left.Y; }
if (heldUp) { move.Z += 1; }
if (heldDown) { move.Z -= 1; }
if (heldForward) { move.X += fwd.X; move.Y += fwd.Y; }
// Is the avatar trying to move?
// bool moving = (move != Vector3.Zero);