diff --git a/Player.cs b/Player.cs index ae46cb1..7827cd9 100644 --- a/Player.cs +++ b/Player.cs @@ -17,7 +17,6 @@ namespace Voxel private int _blockIndex = 0; private double _tickTime = 0; - private bool _isSprinting = false; private Blocks _selectedBlock = Blocks.OakPlanks; private Vector3 previousPosition; @@ -63,20 +62,11 @@ namespace Voxel if (Input.GetKey(Keys.D)) sidewards = 1; - _isSprinting = (Input.GetKey(Keys.LeftControl) && forwards != 0); - if (Input.GetKey(Keys.Space) && OnGround) { Console.WriteLine("Jump"); Velocity = new Vector3(Velocity.X, 0.42f, Velocity.Z); OnGround = false; - - if (_isSprinting) - { - float yawRad = MathHelper.DegreesToRadians(Rotation); - Velocity.X += 0.2f * MathF.Sin(yawRad); - Velocity.Z += 0.2f * -MathF.Cos(yawRad); - } } if (Input.GetMouseButton(MouseButton.Right) && lastClick == 0) @@ -104,16 +94,6 @@ namespace Voxel Camera.Position = Vector3.Lerp(previousPosition, Position, alpha) + Vector3.UnitY * 0.62f; Rotation = Camera.Yaw; - if (_isSprinting) - { - Camera.TargetFOV = 70; - Camera.UpdateProjection(); - } - else - { - Camera.TargetFOV = 60; - } - if (lastClick > 0) { lastClick -= deltaTime; @@ -142,7 +122,7 @@ namespace Voxel inputDir.X * sin + inputDir.Z * cos ); - float M_t = _isSprinting ? 1.3f : 1f; + float M_t = 1.2f; float groundMultiplier = 0.6f; if (!OnGround)