Walking/sprinting speeds are different between protocols
GRAnimated opened this issue ยท 2 comments
Using the 1.13.2 protocol, the speed for sprinting is 4.228m/s
https://cdn.discordapp.com/attachments/675498101078753303/675513150975508480/unknown.png
and on the 1.14.4 protocol, the speed for sprinting is 5.611m/s.
https://cdn.discordapp.com/attachments/675498101078753303/675513239131389974/unknown.png
If I get around to testing more protocols, I'll update the issue, but yeah this is a slightly annoying issue.
Yea, I've personally also experienced this issue, though originally thought it was intentional
I think I have got to the bottom of this issue. I noticed that the constant 0.162771336 in the 1.13 movement code had been changed to 0.216, so I changed it back to 0.162771336 for 1.13. However, I failed to notice another change nearby that negates this change.
Basically, the formula for movement speed is m * 0.6^3 / s^3
, where m
is a multiplier which can change based on whether the player is sprinting etc, and s
is the slipperiness (anti-friction factor between 0 and 1) of the block the player is standing on. Later on, the game multiplies the player's horizontal velocity by s * 0.91
.
However, in 1.13, this 0.91 was factored into s
, which means that h. vel. was multiplied by s
at the end, but the movement speed formula was also adjusted to m * 0.6^3 * 0.91^3 / s^3
to compensate for this change there. You may indeed notice that this weird 1.13 constant, 0.162771336, is equal to 0.6^3 * 0.91^3, and the 1.14 constant, 0.216, is 0.6^3.
The fix was simple to remove this change to the constant, as they cancel each other out.