<commit_before>﻿using UnityEngine;

public class MovementPlayer : Movement
{
    [SerializeField]float m_TurnSpeed = 6f;
    [SerializeField]float m_SpeedWalking = 3f;
    Transform m_CameraTransform;
    Rigidbody m_Rigidbody;
    Vector2 m_Input;
    Vector3 m_MoveVector;
    float m_SpeedCurrent;

    bool _IsPaused = true;

    public bool isPaused
    {
        get { return _IsPaused; }
        set { _IsPaused = value; }
    }

    new void Start ()
    {
        base.Start();

        m_Rigidbody = GetComponent<Rigidbody>();
        m_SpeedCurrent = m_SpeedWalking;
    }
	
	void FixedUpdate()
    {
        if(m_Recorder.IsRecording && !_IsPaused)
        {
            m_Input.Set(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
            if (m_Input.magnitude > 0)
            {
                Move();
            }
        }
    }

    Vector3 InputDirection()
    {
        if (!m_CameraTransform)
        {
            m_CameraTransform = GetComponent<PlayerSetup>().GetPlayerCamera();
            if (!m_CameraTransform)
            {
                return Vector3.zero;
            }
        }

        Vector3 storeDir = m_CameraTransform.right;
        Vector3 direct = transform.position + (storeDir * m_Input.x) + m_CameraTransform.forward * m_Input.y;
        Vector3 dir = direct - transform.position;<commit_msg>Fix not moving when the game start for the agent.<commit_after>﻿using UnityEngine;

public class MovementPlayer : Movement
{
    [SerializeField]float m_TurnSpeed = 6f;
    [SerializeField]float m_SpeedWalking = 3f;
    Transform m_CameraTransform;
    Rigidbody m_Rigidbody;
    Vector2 m_Input;
    Vector3 m_MoveVector;
    float m_SpeedCurrent;

    bool _IsPaused = true;

    public bool isPaused
    {
        get { return _IsPaused; }
        set { _IsPaused = value; }
    }

    new void Start ()
    {
        base.Start();

        m_Rigidbody = GetComponent<Rigidbody>();
        m_SpeedCurrent = m_SpeedWalking;
    }
	
	void FixedUpdate()
    {
        if(m_Recorder.IsRecording)
        {
            m_Input.Set(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));
            if (m_Input.magnitude > 0)
            {
                Move();
            }
        }
    }

    Vector3 InputDirection()
    {
        if (!m_CameraTransform)
        {
            m_CameraTransform = GetComponent<PlayerSetup>().GetPlayerCamera();
            if (!m_CameraTransform)
            {
                return Vector3.zero;
            }
        }

        Vector3 storeDir = m_CameraTransform.right;
        Vector3 direct = transform.position + (storeDir * m_Input.x) + m_CameraTransform.forward * m_Input.y;
        Vector3 dir = direct - transform.position;
{'fraction_non_alphanumeric': 0.09130752373995617, 'fraction_numerical': 0.007304601899196494, 'mean_word_length': 2.0065861690450055, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1453240', 'n_tokens_mistral': 851, 'n_tokens_neox': 814, 'n_words': 159}