mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-29 13:04:59 +00:00
pathing: tighten linear parkour execution
This commit is contained in:
parent
891763602a
commit
d919bff91f
22 changed files with 2072 additions and 79 deletions
|
|
@ -529,16 +529,23 @@ namespace MinecraftClient.Physics
|
|||
/// </summary>
|
||||
private float GetFrictionInfluencedSpeed(float friction)
|
||||
{
|
||||
float effectiveSpeed = GetEffectiveMovementSpeed();
|
||||
if (OnGround)
|
||||
{
|
||||
return MovementSpeed * (PhysicsConsts.GroundAccelerationFactor / (friction * friction * friction));
|
||||
return effectiveSpeed * (PhysicsConsts.GroundAccelerationFactor / (friction * friction * friction));
|
||||
}
|
||||
else
|
||||
{
|
||||
return CreativeFlying ? MovementSpeed * 0.1f : PhysicsConsts.AirAcceleration;
|
||||
return CreativeFlying ? effectiveSpeed * 0.1f : effectiveSpeed * 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
private float GetEffectiveMovementSpeed()
|
||||
{
|
||||
// Vanilla applies a transient +30% total movement-speed modifier while sprinting.
|
||||
return Sprinting ? MovementSpeed * 1.3f : MovementSpeed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the friction of the block below the player's feet.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue