From 8527705ff34c3db4b76c713f8aeb366bfa4abbf7 Mon Sep 17 00:00:00 2001 From: OmniCypher Date: Sun, 14 Feb 2016 13:50:02 -0800 Subject: [PATCH] Various fixes Fixes cooldowns affecting fall induced shockwaves and airbursts Fixes airscooter randomly ending Fixes avatarstate causing jitter on airscooter Fixes airscooter removing fly Fixes preset message for perm remove --- src/com/projectkorra/projectkorra/airbending/AirBurst.java | 5 +++++ src/com/projectkorra/projectkorra/airbending/AirScooter.java | 5 +---- src/com/projectkorra/projectkorra/command/PresetCommand.java | 4 ++-- .../projectkorra/projectkorra/earthbending/Shockwave.java | 2 ++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/com/projectkorra/projectkorra/airbending/AirBurst.java b/src/com/projectkorra/projectkorra/airbending/AirBurst.java index dfc2ed5c..eb93013b 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirBurst.java +++ b/src/com/projectkorra/projectkorra/airbending/AirBurst.java @@ -1,5 +1,6 @@ package com.projectkorra.projectkorra.airbending; +import com.projectkorra.projectkorra.BendingPlayer; import com.projectkorra.projectkorra.ProjectKorra; import com.projectkorra.projectkorra.ability.AirAbility; import com.projectkorra.projectkorra.avatar.AvatarState; @@ -91,6 +92,10 @@ public class AirBurst extends AirAbility { } private void fallBurst() { + if (bPlayer.isOnCooldown("AirBurst")) { + return; + } + Location location = player.getLocation(); double x, y, z; double r = 1; diff --git a/src/com/projectkorra/projectkorra/airbending/AirScooter.java b/src/com/projectkorra/projectkorra/airbending/AirScooter.java index 8340195d..b517f8b0 100644 --- a/src/com/projectkorra/projectkorra/airbending/AirScooter.java +++ b/src/com/projectkorra/projectkorra/airbending/AirScooter.java @@ -87,7 +87,7 @@ public class AirScooter extends AirAbility { @Override public void progress() { - if (!bPlayer.canBendIgnoreCooldowns(this) || !player.isFlying()) { + if (!bPlayer.canBendIgnoreCooldowns(this)) { remove(); return; } @@ -138,9 +138,6 @@ public class AirScooter extends AirAbility { @Override public void remove() { super.remove(); - player.setFlying(hadFly); - player.setAllowFlight(canFly); - player.setSprinting(false); } private void spinScooter() { diff --git a/src/com/projectkorra/projectkorra/command/PresetCommand.java b/src/com/projectkorra/projectkorra/command/PresetCommand.java index b7ecdd4f..3cee5921 100644 --- a/src/com/projectkorra/projectkorra/command/PresetCommand.java +++ b/src/com/projectkorra/projectkorra/command/PresetCommand.java @@ -119,7 +119,7 @@ public class PresetCommand extends PKCommand { bPlayer2 = BendingPlayer.getBendingPlayer(player2); } if (bPlayer2.isPermaRemoved()) { - player.sendMessage(ChatColor.RED + "Your bending was permanently removed."); + player.sendMessage(ChatColor.RED + "That players bending was permanently removed."); return; } boolean boundAll = Preset.bindExternalPreset(player2, name); @@ -148,7 +148,7 @@ public class PresetCommand extends PKCommand { bPlayer2 = BendingPlayer.getBendingPlayer(player2); } if (bPlayer2.isPermaRemoved()) { - player.sendMessage(ChatColor.RED + "Your bending was permanently removed."); + player.sendMessage(ChatColor.RED + "That players bending was permanently removed."); return; } Preset preset = Preset.getPreset(player, name); diff --git a/src/com/projectkorra/projectkorra/earthbending/Shockwave.java b/src/com/projectkorra/projectkorra/earthbending/Shockwave.java index 306803c0..ef98c329 100644 --- a/src/com/projectkorra/projectkorra/earthbending/Shockwave.java +++ b/src/com/projectkorra/projectkorra/earthbending/Shockwave.java @@ -44,6 +44,8 @@ public class Shockwave extends EarthAbility { return; } else if (player.getFallDistance() < threshold || !isEarthbendable(player.getLocation().add(0, -1, 0).getBlock())) { return; + } else if(bPlayer.isOnCooldown("Shockwave")) { + return; } areaShockwave();