Require fully-charged hits for kit abilities
Add a guard that returns early unless the attacker's cooled attack strength (getCooledAttackStrength(0f)) is at least 0.9 (≥90%). This prevents spam-clicks from accumulating kit hit-counters after the AttackSpeed attribute change, ensuring only fully charged swings trigger kit ability logic; the check is performed before resolving attacker kit/playstyle/charge data.
This commit is contained in:
@@ -97,6 +97,12 @@ class KitEventDispatcher(
|
|||||||
if ( !isIngame() ) return
|
if ( !isIngame() ) return
|
||||||
if (!isAlive( victim )) return
|
if (!isAlive( victim )) return
|
||||||
|
|
||||||
|
// ── Fully-charged-hit guard ──────────────────────────────────────────────
|
||||||
|
// Since the generic AttackSpeed attribute was doubled, spam-clicks would
|
||||||
|
// otherwise still accumulate kit hit-counters. We only let fully charged
|
||||||
|
// swings (≥ 90 %) through so kit abilities can't be spammed.
|
||||||
|
if (attacker.getCooledAttackStrength( 0f ) < 0.9f ) return
|
||||||
|
|
||||||
val attackerKit = kitManager.getSelectedKit( attacker ) ?: return
|
val attackerKit = kitManager.getSelectedKit( attacker ) ?: return
|
||||||
val attackerPlaystyle = kitManager.getSelectedPlaystyle( attacker )
|
val attackerPlaystyle = kitManager.getSelectedPlaystyle( attacker )
|
||||||
val chargeData = kitManager.getChargeData( attacker ) ?: return
|
val chargeData = kitManager.getChargeData( attacker ) ?: return
|
||||||
|
|||||||
Reference in New Issue
Block a user