diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-05 15:36:11 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-05 15:36:11 +0200 |
commit | cf39ee9e242bccecaff8444628518a566d250ae9 (patch) | |
tree | 96124c4c64c8cabb9babc8f35b35f38da8cb14c6 /src/main/java/at | |
parent | b67dc7ffe67f2da961c88c9516b12ea998fb9570 (diff) | |
download | skyhanni-cf39ee9e242bccecaff8444628518a566d250ae9.tar.gz skyhanni-cf39ee9e242bccecaff8444628518a566d250ae9.tar.bz2 skyhanni-cf39ee9e242bccecaff8444628518a566d250ae9.zip |
fixed error in the moving location calculation
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/Features.java | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt | 15 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 8adf851ce..9d63c9b37 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -129,7 +129,7 @@ public class Features extends Config { @Expose @Category(name = "Dev", desc = "Debug and test stuff. Developers are cool.") - public DevData dev = new DevData(); + public DevConfig dev = new DevConfig(); @Expose public OldHidden hidden = new OldHidden(); diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt index 081641c9a..045abbf58 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.utils +import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.test.command.CopyErrorCommand import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils.toSingletonListOrEmpty @@ -103,11 +104,11 @@ class ParkourHelper( for ((index, location) in locations.asSequence().withIndex().drop(current) .take(lookAhead) + inProgressVec.map { it.second }) { - var aabb = axisAlignedBB(location) - val isMovingPlattform = location !in locations - if (isMovingPlattform) { - aabb = aabb.expandBlock() - } + val isMovingPlatform = location !in locations + if (isMovingPlatform && showEverything) continue + val aabb = if (isMovingPlatform) { + axisAlignedBB(location).expandBlock() + } else axisAlignedBB(location) event.drawFilledBoundingBox(aabb, colorForIndex(index), 1f) if (!isMovingPlattform) { @@ -123,8 +124,8 @@ class ParkourHelper( private fun getInProgressPair(): Pair<IndexedValue<LorenzVec>, IndexedValue<LorenzVec>>? { if (current < 0 || current + lookAhead >= locations.size) return null - val currentPosition = locations[current] - val nextPosition = locations[current + 1] + val currentPosition = locations[current].offsetCenter() + val nextPosition = locations[current + 1].offsetCenter() val lookAheadStart = locations[current + lookAhead - 1] val lookAheadEnd = locations[current + lookAhead] |