From e361596a5ea1b073f1aa4f46486dc6d49f470287 Mon Sep 17 00:00:00 2001 From: cswhite2000 <18whitechristop@gmail.com> Date: Sun, 25 Apr 2021 19:00:16 -0700 Subject: [PATCH] Fix friction being applied to velocity changes Also fix NoSuchMethodError in LegacyFlagBeam Signed-off-by: cswhite2000 <18whitechristop@gmail.com> --- .../src/main/java/tc/oc/pgm/flag/LegacyFlagBeamMatchModule.java | 2 +- util/src/main/java/tc/oc/pgm/util/nms/NMSHacks.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/tc/oc/pgm/flag/LegacyFlagBeamMatchModule.java b/core/src/main/java/tc/oc/pgm/flag/LegacyFlagBeamMatchModule.java index 870500264a..1ce50921cf 100644 --- a/core/src/main/java/tc/oc/pgm/flag/LegacyFlagBeamMatchModule.java +++ b/core/src/main/java/tc/oc/pgm/flag/LegacyFlagBeamMatchModule.java @@ -98,7 +98,7 @@ public void onPlayerChangedWorld(PlayerChangedWorldEvent event) { MatchPlayer player = match.getPlayer(event.getPlayer()); if (player == null) return; - if (event.getWorld() == match.getWorld()) showLater(player); + if (event.getPlayer().getWorld() == match.getWorld()) showLater(player); else beams().forEach(beam -> beam.hide(player)); } diff --git a/util/src/main/java/tc/oc/pgm/util/nms/NMSHacks.java b/util/src/main/java/tc/oc/pgm/util/nms/NMSHacks.java index d52cc33466..d21734da86 100644 --- a/util/src/main/java/tc/oc/pgm/util/nms/NMSHacks.java +++ b/util/src/main/java/tc/oc/pgm/util/nms/NMSHacks.java @@ -868,6 +868,7 @@ static Skin getPlayerSkin(Player player) { static void updateVelocity(Player player) { EntityPlayer handle = ((CraftPlayer) player).getHandle(); + handle.velocityChanged = false; handle.playerConnection.sendPacket(new PacketPlayOutEntityVelocity(handle)); }