From 9bb15c6cb1003b40dda07f14bf3abbe50652cb1d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 26 Feb 2023 22:52:44 +0100 Subject: Griffin burrow waypoint tip block moves slower. --- .../skyhanni/features/event/diana/GriffinBurrowHelper.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index f7b21476c..62b914f7d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -26,6 +26,7 @@ class GriffinBurrowHelper { private var lastDug: LorenzVec? = null private var teleportedLocation: LorenzVec? = null private var lastGuessTime = 0L + private var lastAnimationTime = 0L @SubscribeEvent fun onSoopyGuessBurrow(event: SoopyGuessBurrowEvent) { @@ -135,7 +136,7 @@ class GriffinBurrowHelper { val distance = location.distance(playerLocation) val burrowType = burrow.value // if (distance < 30) { - event.drawColor(location, burrowType.color, distance > 10) + event.drawColor(location, burrowType.color, distance > 10) // } event.drawDynamicText(location.add(0, 1, 0), burrowType.text, 1.5) // if (distance < 10) { @@ -151,7 +152,7 @@ class GriffinBurrowHelper { event.drawColor(guessLocation, LorenzColor.WHITE, distance > 10) event.drawDynamicText(guessLocation.add(0, 1, 0), "Guess", 1.5) if (distance > 5) { - val formattedDistance = LorenzUtils.formatDouble(distance) + val formattedDistance = LorenzUtils.formatInteger(distance.toInt()) event.drawDynamicText(guessLocation.add(0, 1, 0), "§e${formattedDistance}m", 1.7, yOff = 10f) } } @@ -211,8 +212,13 @@ class GriffinBurrowHelper { event.draw3DLine(animation.add(0.5, 0.5, 0.5), target.add(0.5, 0.5, 0.5), LorenzColor.WHITE.toColor(), 2, true) - vector = vector.multiply(1 / vector.length()) - vector = vector.multiply(0.18) - return animation.add(vector) + return if (System.currentTimeMillis() > lastAnimationTime + 25) { + lastAnimationTime = System.currentTimeMillis() + vector = vector.multiply(1 / vector.length()) + vector = vector.multiply(0.18) + animation.add(vector) + } else { + animation + } } } \ No newline at end of file -- cgit