30 if (
other.getContainingLocation() != ghost.
getEntity().getContainingLocation() || !
other.isAlive()) {
34 super.advance(amount, ghost);
46 float angle = Misc.getAngleInDegrees(
other.getLocation(), ghost.
getEntity().getLocation());
48 Vector2f dest = Misc.getUnitVectorAtDegreeAngle(angle);
50 Vector2f.add(
other.getLocation(), dest, dest);
52 }
else if (
other.getVelocity().length() > 10f) {
53 int burn = (int) Misc.getBurnLevelForSpeed(
other.getVelocity().length());
54 if (burn < 1) burn = 1;
55 Vector2f dest = Misc.getUnitVectorAtDegreeAngle(Misc.getAngleInDegrees(
other.getVelocity()) +
angleOffset);
58 Vector2f.add(
other.getLocation(), dest, dest);
59 ghost.
moveTo(dest,
new Vector2f(), burn);