Fix persistent FOV when walk speed is ever set to zero

Fixes #3139
This commit is contained in:
Camotoy 2022-07-23 10:50:43 -04:00
parent 25289a3606
commit 76bb5d4d88
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F

View file

@ -1692,7 +1692,8 @@ public class GeyserSession implements GeyserConnection, CommandSender {
abilityLayer.setLayerType(AbilityLayer.Type.BASE);
abilityLayer.setFlySpeed(flySpeed);
abilityLayer.setWalkSpeed(walkSpeed);
// https://github.com/GeyserMC/Geyser/issues/3139 as of 1.19.10
abilityLayer.setWalkSpeed(walkSpeed == 0f ? 0.01f : walkSpeed);
Collections.addAll(abilityLayer.getAbilitiesSet(), USED_ABILITIES);
updateAbilitiesPacket.getAbilityLayers().add(abilityLayer);