diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-05-13 11:59:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 11:59:42 +0200 |
commit | b0720fae706bad2571039222f4aeba26f996cbdb (patch) | |
tree | 333549f2c18c2dc04d5ede4a97fa036ef294557b /src/main/java/at/hannibal2/skyhanni | |
parent | 1a758de86232aaae962d707768b44c1babd85046 (diff) | |
download | skyhanni-b0720fae706bad2571039222f4aeba26f996cbdb.tar.gz skyhanni-b0720fae706bad2571039222f4aeba26f996cbdb.tar.bz2 skyhanni-b0720fae706bad2571039222f4aeba26f996cbdb.zip |
Improvement: better performance by reducing line of sight check for minion display (#1780)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index e0f787822..db2dd184e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -29,8 +29,8 @@ import at.hannibal2.skyhanni.utils.ItemUtils.cleanName import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LocationUtils -import at.hannibal2.skyhanni.utils.LocationUtils.canBeSeen import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo +import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.LorenzVec @@ -339,7 +339,7 @@ class MinionFeatures { val minions = minions ?: return for (minion in minions) { val location = minion.key.add(y = 1.0) - if (!location.canBeSeen()) continue + if (location.distanceToPlayer() > 50) continue val lastEmptied = minion.value.lastClicked if (playerLocation.distance(location) >= config.emptiedTime.distance) continue |