The infamous look direction bounce bug

This commit is contained in:
Virizion 2016-02-04 23:54:54 -05:00
parent b0b43524da
commit 2ac7840d71

View File

@ -736,12 +736,20 @@ public class SpeedBuilders extends SoloGame
{
for (RecreationData recreation : _buildRecreations.values())
{
Vector vec = player.getLocation().getDirection().multiply(-1);
Vector vec = UtilAlg.getTrajectory(recreation.getMidpoint(), player.getLocation());
if (UtilMath.offsetSquared(player.getLocation(), recreation.getMidpoint()) < 64)
{
Location tpLoc = recreation.getMidpoint().add(vec.clone().multiply(8));
tpLoc.setDirection(player.getLocation().getDirection());
//First tp out this combats hacked clients with anti-KB
player.teleport(tpLoc);
//Then apply velocity as normal
UtilAction.velocity(player, vec, 1.8, false, 0, 0.4, vec.length(), false);
player.playSound(player.getEyeLocation(), Sound.NOTE_PLING, 10F, 0.5F);
UtilAction.velocity(player, vec, 1.6, false, 0, 0.4, vec.length(), false);
}
}
}