From 00097da45aaab565860c607de070a6fa00b04064 Mon Sep 17 00:00:00 2001 From: Sobki Date: Sun, 14 Aug 2016 09:07:30 +1000 Subject: [PATCH] Fixed movement while hovering with Flight (#541) * Fixed your own water manips breaking spout * Fixed Surge wave freeze from not reverting ice to water Surge wave now reverts the ice blocks back to water if they were originally water :))))) * Fixed movement while hovering with Flight You can no longer use shift or space to move up or down respectively while hovering with Flight. New developer Matan also added to /b who --- .../projectkorra/airbending/AirFlight.java | 11 +++++++++++ .../projectkorra/projectkorra/command/WhoCommand.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/airbending/AirFlight.java b/src/com/projectkorra/projectkorra/airbending/AirFlight.java index e563eb70..307fdbab 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirFlight.java +++ b/src/com/projectkorra/projectkorra/airbending/AirFlight.java @@ -21,6 +21,7 @@ public class AirFlight extends FlightAbility { private int maxHitsBeforeRemoval; private double speed; private Flight flight; + static int hoverY; public AirFlight(Player player) { super(player); @@ -71,6 +72,7 @@ public class AirFlight extends FlightAbility { HOVERING.put(playername, new PlayerFlyData(player.getAllowFlight(), player.isFlying())); player.setVelocity(new Vector(0, 0, 0)); player.setFlying(true); + hoverY = Integer.valueOf((int) player.getLocation().getY()); } } else { if (HOVERING.containsKey(playername)) { @@ -107,6 +109,15 @@ public class AirFlight extends FlightAbility { Vector vec = player.getVelocity().clone(); vec.setY(0); player.setVelocity(vec); + if (!Integer.valueOf((int) player.getLocation().getY()).equals(hoverY)) { + Location loc = new Location(player.getWorld(), + player.getLocation().getX(), + hoverY + 0.5, + player.getLocation().getZ(), + player.getLocation().getYaw(), + player.getLocation().getPitch()); + player.teleport(loc); + } } else { player.setVelocity(player.getEyeLocation().getDirection().normalize().multiply(speed)); } diff --git a/src/com/projectkorra/projectkorra/command/WhoCommand.java b/src/com/projectkorra/projectkorra/command/WhoCommand.java index 38a2d5e7..22121455 100644 --- a/src/com/projectkorra/projectkorra/command/WhoCommand.java +++ b/src/com/projectkorra/projectkorra/command/WhoCommand.java @@ -59,10 +59,10 @@ public class WhoCommand extends PKCommand { staff.put("679a6396-6a31-4898-8130-044f34bef743", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // savior67 staff.put("1c30007f-f8ef-4b4e-aff0-787aa1bc09a3", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // Sorin staff.put("dd578a4f-d35e-4fed-94db-9d5a627ff962", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // Sobki + staff.put("ed8c05af-eb43-4b71-9be3-c2ccca6c849a", ChatColor.DARK_PURPLE + "ProjectKorra Developer"); // Matan staff.put("623df34e-9cd4-438d-b07c-1905e1fc46b6", ChatColor.GREEN + "ProjectKorra Concept Designer"); // Loony staff.put("3c484e61-7876-46c0-98c9-88c7834dc96c", ChatColor.GREEN + "ProjectKorra Concept Designer"); // SamuraiSnowman (Zmeduna) - staff.put("1d4a8a47-1f3b-40a6-b412-c15d874491b8", ChatColor.GREEN + "ProjectKorra Concept Designer"); // Fyf staff.put("3d5bc713-ab8b-4125-b5ba-a1c1c2400b2c", ChatColor.GOLD + "ProjectKorra Community Moderator"); // Gold staff.put("38217173-8a32-4ba7-9fe1-dd4fed031a74", ChatColor.GOLD + "ProjectKorra Community Moderator"); // Easte