Server.Mobiles.PlayerMobile.ComputeMovementSpeed C# (CSharp) Method

ComputeMovementSpeed() public method

public ComputeMovementSpeed ( Direction dir, bool checkTurning ) : TimeSpan
dir Direction
checkTurning bool
return TimeSpan
		public override TimeSpan ComputeMovementSpeed( Direction dir, bool checkTurning )
		{
			if ( checkTurning && (dir & Direction.Mask) != (this.Direction & Direction.Mask) )
				return Mobile.RunMount;	// We are NOT actually moving (just a direction change)

			TransformContext context = TransformationSpellHelper.GetContext( this );

			if (false && context != null )
				return Mobile.WalkFoot;

			bool running = ( (dir & Direction.Running) != 0 );

			bool onHorse = ( this.Mount != null );
            
			if( onHorse )
				return ( running ? Mobile.RunMount : Mobile.WalkMount );

			return ( running ? Mobile.RunFoot : Mobile.WalkFoot );
		}