aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-05-13 11:59:42 +0200
committerGitHub <noreply@github.com>2024-05-13 11:59:42 +0200
commitb0720fae706bad2571039222f4aeba26f996cbdb (patch)
tree333549f2c18c2dc04d5ede4a97fa036ef294557b /src
parent1a758de86232aaae962d707768b44c1babd85046 (diff)
downloadskyhanni-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')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt4
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