Add CanAttack to IActionBlocker, prevent using guns when dead (#769)
This commit is contained in:
committed by
GitHub
parent
5e2cac78ac
commit
d1ff84e95d
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
||||
using Robust.Server.Interfaces.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -30,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged
|
||||
|
||||
private bool UserCanFire(IEntity user)
|
||||
{
|
||||
return UserCanFireHandler == null || UserCanFireHandler(user);
|
||||
return (UserCanFireHandler == null || UserCanFireHandler(user)) && ActionBlockerSystem.CanAttack(user);
|
||||
}
|
||||
|
||||
private void Fire(IEntity user, GridCoordinates clickLocation)
|
||||
|
||||
Reference in New Issue
Block a user