Fix glitch in clownfish smacker.

This commit is contained in:
StevenLawson 2014-07-19 15:29:07 -04:00
parent 54be4f7e88
commit 73214165a5

View File

@ -299,8 +299,8 @@ public class TFM_PlayerListener implements Listener
{ {
if (targetPosVec.distanceSquared(playerLocVec) < (RADIUS_HIT * RADIUS_HIT)) if (targetPosVec.distanceSquared(playerLocVec) < (RADIUS_HIT * RADIUS_HIT))
{ {
player.setFlying(false); target.setFlying(false);
player.setVelocity(targetPosVec.subtract(playerLocVec).normalize().multiply(STRENGTH)); target.setVelocity(targetPosVec.subtract(playerLocVec).normalize().multiply(STRENGTH));
didHit = true; didHit = true;
} }
} }
@ -333,10 +333,10 @@ public class TFM_PlayerListener implements Listener
player.getInventory().getItemInHand().setType(Material.POTATO_ITEM); player.getInventory().getItemInHand().setType(Material.POTATO_ITEM);
} }
}
event.setCancelled(true); event.setCancelled(true);
break; break;
}
} }
} }
break; break;