Fix attack speed affecting other modules

This commit is contained in:
harlanx 2022-09-13 20:48:25 +08:00
parent 43a0f4493d
commit bed2df354c

View File

@ -370,10 +370,18 @@ namespace cheat::feature
}
}
static bool isFastSpeed = false;
if (rapidFire.f_AttackSpeed && isAttacking)
{
if (!isinf(processStateInfo.m_Length))
app::Animator_set_speed(attacker.animator(), rapidFire.f_SpeedMultiplier, nullptr);
else
isFastSpeed = true;
}
else if (IsAttackByAvatar(attacker) && isFastSpeed) {
//LOG_DEBUG("Speed Reverted");
app::Animator_set_speed(attacker.animator(), processStateInfo.m_SpeedMultiplier, nullptr);
isFastSpeed = false;
}
CALL_ORIGIN(VCAnimatorEvent_HandleProcessItem_Hook, __this, processItem, processStateInfo, mode, method);
}