From 76bb5d4d8811442aceeed2ad6efef97a370baf53 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Sat, 23 Jul 2022 10:50:43 -0400 Subject: [PATCH] Fix persistent FOV when walk speed is ever set to zero Fixes #3139 --- .../main/java/org/geysermc/geyser/session/GeyserSession.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index 519eef3b5..d3e1b7a7b 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -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);