Fix punching (#4141)

This commit is contained in:
Vera Aguilera Puerto
2021-06-05 18:05:57 +02:00
committed by GitHub
parent 3af9c334ea
commit 62ce603858
4 changed files with 33 additions and 7 deletions

View File

@@ -60,6 +60,7 @@ namespace Content.Server.GameObjects.EntitySystems.Weapon.Melee
private void OnClickAttack(EntityUid uid, MeleeWeaponComponent comp, ClickAttackEvent args)
{
args.Handled = true;
var curTime = _gameTiming.CurTime;
if (curTime < comp.CooldownEnd || !args.Target.IsValid())
@@ -105,6 +106,7 @@ namespace Content.Server.GameObjects.EntitySystems.Weapon.Melee
private void OnWideAttack(EntityUid uid, MeleeWeaponComponent comp, WideAttackEvent args)
{
args.Handled = true;
var curTime = _gameTiming.CurTime;
if (curTime < comp.CooldownEnd)