Events all over melee (#16997)

This commit is contained in:
Nemanja
2023-06-07 16:26:45 -04:00
committed by GitHub
parent 937aae14ff
commit 37d3056809
9 changed files with 170 additions and 34 deletions

View File

@@ -29,7 +29,7 @@ public sealed partial class NPCCombatSystem
var cdRemaining = weapon.NextAttack - _timing.CurTime;
// If CD remaining then backup.
if (cdRemaining < TimeSpan.FromSeconds(1f / weapon.AttackRate) * 0.5f)
if (cdRemaining < TimeSpan.FromSeconds(1f / _melee.GetAttackRate(component.Weapon, uid, weapon)) * 0.5f)
return;
if (!_physics.TryGetNearestPoints(uid, component.Target, out var pointA, out var pointB))