Fix cuffing in harm mode sometimes not working (#13701)

This commit is contained in:
jicksaw
2023-01-27 03:04:26 +02:00
committed by GitHub
parent 0e8b8c0735
commit 993a343631
3 changed files with 10 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
if (component.AttackRate.Equals(0f))
return;
if (!component.ResetOnHandSelected)
return;
// If someone swaps to this weapon then reset its cd.
var curTime = Timing.CurTime;
var minimum = curTime + TimeSpan.FromSeconds(1 / component.AttackRate);