Skip to content

Commit bc0a795

Browse files
committed
fix: (combat) five adversarially-verified defects in Velocity and KillAura
Velocity Simple mode zeroed explosion knockback exactly when the user asked to keep it (inverted guard) and Click mode discarded its computed target whenever WhenFacingEnemyOnly was off, making the mode inert. KillAura no longer retargets through the raycast to entities that fail isSelected (teams/anti-bot/invisibility/focus), its per-tick attack loop stops driving the click budget negative when distance/double-click bonus clicks fire, and prevTargetEntities only accumulates in Switch mode instead of leaking one id per hit forever in Single/Multi.
1 parent b850e8a commit bc0a795

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/KillAura.kt‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ object KillAura : Module("KillAura", Category.COMBAT, Category.SubCategory.COMBA
650650
val wasBlocking = blockStatus
651651

652652
runAttack(it == 0, it + 1 == maxClicks)
653-
clicks--
653+
if (clicks > 0) clicks--
654654

655655
if (wasBlocking && !blockStatus && (releaseAutoBlock && !ignoreTickRule || autoBlock == "Off")) {
656656
return@handler
@@ -882,12 +882,9 @@ object KillAura : Module("KillAura", Category.COMBAT, Category.SubCategory.COMBA
882882

883883
val switchMode = targetMode == "Switch"
884884

885-
if (!switchMode || switchTimer.hasTimePassed(switchDelay)) {
885+
if (switchMode && switchTimer.hasTimePassed(switchDelay)) {
886886
prevTargetEntities += currentTarget.entityId
887-
888-
if (switchMode) {
889-
switchTimer.reset()
890-
}
887+
switchTimer.reset()
891888
}
892889

893890
// Open inventory
@@ -1142,7 +1139,7 @@ private fun updateHittable() {
11421139
) { entity -> !livingRaycast || entity is EntityLivingBase && entity !is EntityArmorStand }
11431140

11441141
if (raycastEntity != null && raycastEntity is EntityLivingBase && (!(raycastEntity is EntityPlayer && raycastEntity.isClientFriend()))) {
1145-
if (raycastIgnored && target != raycastEntity) {
1142+
if (raycastIgnored && target != raycastEntity && isSelected(raycastEntity, true)) {
11461143
this.target = raycastEntity
11471144
}
11481145

‎src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/Velocity.kt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,9 @@ object Velocity : Module("Velocity", Category.COMBAT, Category.SubCategory.COMBA
883883
}
884884

885885
entity = result
886-
} else getNearestEntityInRange(clickRange)?.takeIf { isSelected(it, true) }
886+
} else {
887+
entity = getNearestEntityInRange(clickRange)?.takeIf { isSelected(it, true) }
888+
}
887889
}
888890

889891
entity ?: return@handler
@@ -1907,7 +1909,7 @@ object Velocity : Module("Velocity", Category.COMBAT, Category.SubCategory.COMBA
19071909
}
19081910
} else if (packet is S27PacketExplosion) {
19091911
// Don't cancel explosions, modify them, they could change blocks in the world
1910-
if (horizontal != 0f && vertical != 0f) {
1912+
if (horizontal == 0f && vertical == 0f) {
19111913
packet.field_149152_f = 0f
19121914
packet.field_149153_g = 0f
19131915
packet.field_149159_h = 0f

0 commit comments

Comments
 (0)