diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/Aerial/AerialFallingState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/Aerial/AerialFallingState.cs index 23a2643..974fba7 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/Aerial/AerialFallingState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/Aerial/AerialFallingState.cs @@ -16,11 +16,14 @@ public class AerialFallingState : AerialBaseState //if Grav Vel > 0 then jumping if(aSM.pStats.GravVel > 0 && (aSM.mSM.currentState != aSM.mSM.SlideState && aSM.mSM.currentState != aSM.mSM.CrouchState && aSM.mSM.currentState != aSM.mSM.RagdollState && aSM.mSM.currentState != aSM.mSM.RecoveringState)){ + Debug.Log("Going to Jump From Fall"); aSM.SwitchState(aSM.JumpingState); + } //if jump has been pressed and has glider and is in a state that allows it glide else if(Input.GetButton("Jump") && aSM.pStats.HasGlider && (aSM.mSM.currentState != aSM.mSM.SlideState && aSM.mSM.currentState != aSM.mSM.CrouchState && aSM.mSM.currentState != aSM.mSM.RagdollState && aSM.mSM.currentState != aSM.mSM.RecoveringState) && !aSM.pStats.IsPaused){ + Debug.Log("Going to Glide From Fall"); aSM.SwitchState(aSM.GlidingState); } diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs index 8afcb8d..a167e2a 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs @@ -210,7 +210,8 @@ public class AerialStateManager : NetworkBehaviour } public void SwitchState(AerialBaseState state){ - + if (!IsLocalPlayer) { return; } + currentState.ExitState(this, state); //Sets the previous State @@ -304,7 +305,7 @@ public class AerialStateManager : NetworkBehaviour curJumpNum = 0; } else{ - pStats.GravVel = pStats.JumpPow; + pStats.GravVel = pStats.JumpPow; } diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/DashState/DashStateManager.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/DashState/DashStateManager.cs index 2febe63..09770da 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/DashState/DashStateManager.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/DashState/DashStateManager.cs @@ -78,7 +78,7 @@ public class DashStateManager : NetworkBehaviour } public void SwitchState(DashBaseState state){ - + if (!IsLocalPlayer) { return; } currentState.ExitState(this, state); //Sets the previous State diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/MoveStateManager.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/MoveStateManager.cs index 922ec42..3b1e372 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/MoveStateManager.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/MoveStateManager.cs @@ -172,6 +172,7 @@ public class MoveStateManager : NetworkBehaviour } public void SwitchState(MoveBaseState state){ + if (!IsLocalPlayer) { return; } currentState.ExitState(this, state); //Sets the previous State @@ -313,9 +314,9 @@ public class MoveStateManager : NetworkBehaviour //Get hit into a ragdoll public void GetHit(Vector3 dir, float force){ + if (!IsLocalPlayer) { return; } dir.Normalize(); dirHit = dir * force; - if (!IsLocalPlayer) { return; } SwitchState(RagdollState); } diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveIdleState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveIdleState.cs index a042656..5f6e9a2 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveIdleState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveIdleState.cs @@ -6,12 +6,12 @@ public class MoveIdleState : MoveBaseState { public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){ mSM.GetComponent().SetBool("isIdle", true); - Debug.Log("Entered Idle"); + //Debug.Log("Entered Idle"); } public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){ mSM.GetComponent().SetBool("isIdle", false); - Debug.Log("Exited Idle"); + //Debug.Log("Exited Idle"); } public override void UpdateState(MoveStateManager mSM){ diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveJogState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveJogState.cs index 3c50e87..25124cb 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveJogState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveJogState.cs @@ -6,12 +6,12 @@ public class MoveJogState : MoveBaseState { public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){ mSM.GetComponent().SetBool("isJogging", true); - Debug.Log("Entered Jog"); + //Debug.Log("Entered Jog"); } public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){ mSM.GetComponent().SetBool("isJogging", false); - Debug.Log("Exited Jog"); + //Debug.Log("Exited Jog"); } public override void UpdateState(MoveStateManager mSM){ diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveRunState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveRunState.cs index 845d5be..f35e35d 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveRunState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveRunState.cs @@ -6,12 +6,12 @@ public class MoveRunState : MoveBaseState { public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){ mSM.GetComponent().SetBool("isRunning", true); - Debug.Log("Entered Run"); + //Debug.Log("Entered Run"); } public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){ mSM.GetComponent().SetBool("isRunning", false); - Debug.Log("Exit Run"); + //Debug.Log("Exit Run"); } public override void UpdateState(MoveStateManager mSM){ diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveWalkState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveWalkState.cs index ecd37c9..ad2a04a 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveWalkState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/MovementState/WASD/MoveWalkState.cs @@ -6,12 +6,12 @@ public class MoveWalkState : MoveBaseState { public override void EnterState(MoveStateManager mSM, MoveBaseState previousState){ mSM.GetComponent().SetBool("isWalking", true); - Debug.Log("Entered Walk"); + //Debug.Log("Entered Walk"); } public override void ExitState(MoveStateManager mSM, MoveBaseState nextState){ mSM.GetComponent().SetBool("isWalking", false); - Debug.Log("Exited Walk"); + //Debug.Log("Exited Walk"); } public override void UpdateState(MoveStateManager mSM){ diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/NitroState/NitroStateManager.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/NitroState/NitroStateManager.cs index 88b945a..aeacba8 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/NitroState/NitroStateManager.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/NitroState/NitroStateManager.cs @@ -92,7 +92,7 @@ public class NitroStateManager : NetworkBehaviour } public void SwitchState(NitroBaseState state){ - + if (!IsLocalPlayer) { return; } currentState.ExitState(this, state); //Sets the previous State diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/Kick&Punch/OffenseKickState.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/Kick&Punch/OffenseKickState.cs index f8118ba..bb40c74 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/Kick&Punch/OffenseKickState.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/Kick&Punch/OffenseKickState.cs @@ -48,9 +48,6 @@ public class OffenseKickState : OffenseBaseState else{ legRotation = -90; } - - //jitter player upwards because of a weird issue with collider - oSM.moveController.Move(new Vector3(0,.002f,0)); } //kicking timer diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/OffenseStateManager.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/OffenseStateManager.cs index d9d5b31..5c2ff10 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/OffenseStateManager.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/OffenseState/OffenseStateManager.cs @@ -101,7 +101,7 @@ public class OffenseStateManager : NetworkBehaviour } public void SwitchState(OffenseBaseState state){ - + if (!IsLocalPlayer) { return; } currentState.ExitState(this, state); //Sets the previous State