From 16012285e0334641353b36ef37446c2140a82935 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Thu, 4 Feb 2016 23:11:51 +0000 Subject: [PATCH] rotation fix --- .../mineplex/game/clans/clans/siege/weapon/Catapult.java | 6 ++---- .../mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java | 5 ----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java index e04d4cdae..5975eb405 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Catapult.java @@ -170,9 +170,7 @@ public class Catapult extends SiegeWeapon return; } - System.out.println(getPoint(_yaw)); - - ArmorStand stand = (ArmorStand) getEntity("Point_" + getPoint(_yaw)); + ArmorStand stand = (ArmorStand) getEntity("Point_" + getPoint(Math.toDegrees(((ArmorStand) getEntity("WEAPON")).getHeadPose().getY()))); stand.setPassenger(getRider()); } @@ -184,7 +182,7 @@ public class Catapult extends SiegeWeapon protected boolean OverrideMount(Player player) { - ArmorStand stand = (ArmorStand) getEntity("Point_" + getPoint(_yaw)); + ArmorStand stand = (ArmorStand) getEntity("Point_" + getPoint(Math.toDegrees(((ArmorStand) getEntity("WEAPON")).getHeadPose().getY()))); stand.setPassenger(player); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java index 9b9e2bcc4..64459b45d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/SiegeWeapon.java @@ -211,11 +211,6 @@ public abstract class SiegeWeapon implements Listener ArmorStand armorStand = (ArmorStand) getEntity("WEAPON"); double standYaw = _yaw % 360; - if (getRider() == null) - { - return; - } - if (getRider() != null) { double riderYaw = (getRider().getLocation().getYaw() + (_invertRotation ? 180 : 0)) % 360;