diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java index b7788772d..865f7c2c4 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/cannon/Cannon.java @@ -523,11 +523,15 @@ public class Cannon implements Listener ArmorStand armorStand = (ArmorStand) UtilMath.getFirst(_entities); double standYaw = Math.toDegrees(armorStand.getHeadPose().getY()) % 360; double riderYaw = _rider.getLocation().getYaw() % 360; - + + // riderYaw = 350 and standYaw = 20 + // dif should be -30 and not 330 double dif = riderYaw - standYaw; - + if (dif > 180) dif -= 360; + if (dif < -180) dif += 360; + double yaw = standYaw + Math.min(dif / 20.f, 5f); - + Location pos = armorStand.getLocation(); pos.setYaw((float) yaw);