small changes to player and items for cleanup

This commit is contained in:
Melbyj1125
2021-11-17 12:21:15 -06:00
parent 2fe2fa5764
commit e2a1a9150c
20 changed files with 135 additions and 46 deletions

View File

@@ -101,7 +101,7 @@ public class PlayerMovement : NetworkBehaviour
// Don't do movement unless this is the local player controlling it
// Otherwise we let the server handle moving us
//if (!IsLocalPlayer) { return; }
if (!IsLocalPlayer) { return; }
// Don't lock the cursor multiple times if this isn't the local player
// Also don't want to lock the cursor for the king
@@ -151,20 +151,6 @@ public class PlayerMovement : NetworkBehaviour
//Debug.LogWarning("MoveController is either Disabled or wasn't retrieved correctly");
}
//TESTING RAGDOLL STUFF NEEDS SOME WORK
//Checks if player should respawn
//Respawn();
//if (Input.GetMouseButton(1) && heldDown == false){
// getHit(new Vector3(vel.x, 0, vel.z), 30);
// heldDown = true;
//}
if(!Input.GetMouseButton(1)){
heldDown = false;
}
//TEMP FOR TESTING
//Checks if player should respawn
Respawn();
@@ -189,6 +175,7 @@ public class PlayerMovement : NetworkBehaviour
//Gravity
Gravity();
//Adds persisting momentum to player
driftVel = Vector3.Lerp(driftVel, vel, pStats.Traction * Time.deltaTime);
//Moving outside basic wasd