Fixed infinite stealth triggering when modifying GenericAttackSpeed with other mods (#116)

This commit is contained in:
Shade authored and Ozzatron committed 2026-06-12 19:25:56 -04:00
1 parent daa8691923
commit 0262efa0c8
1 file changed
+1 -1
+1 -1
View File
@@ -6407,7 +6407,7 @@ namespace CalamityMod.CalPlayer
// "Clockwork" weapons can chain-fire multiple stealth strikes (really only 2 max) until you run out of stealth.
bool animationCheck = it.useAnimation == it.useTime
? Player.itemAnimation == Player.itemAnimationMax - 1 // Standard weapon (first frame of use animation)
: Player.itemTime == (int)(it.useTime / Player.GetAttackSpeed<RogueDamageClass>()); // Clockwork weapon (first frame of any individual use event)
: Player.itemTime == (int)(it.useTime / Player.GetTotalAttackSpeed<RogueDamageClass>()); // Clockwork weapon (first frame of any individual use event)
if (!stealthStrikeThisFrame && animationCheck && playerUsingWeapon)
{