Gun tweaks (#8320)
This commit is contained in:
@@ -65,10 +65,8 @@ namespace Content.Shared.CombatMode
|
||||
{
|
||||
var entity = eventArgs.SenderSession.AttachedEntity;
|
||||
|
||||
if (entity == default || !EntityManager.TryGetComponent(entity, out SharedCombatModeComponent? combatModeComponent))
|
||||
{
|
||||
if (entity == null || !EntityManager.TryGetComponent(entity, out SharedCombatModeComponent? combatModeComponent))
|
||||
return;
|
||||
}
|
||||
|
||||
combatModeComponent.IsInCombatMode = ev.Active;
|
||||
}
|
||||
|
||||
16
Content.Shared/Interaction/Events/MeleeAttackAttemptEvent.cs
Normal file
16
Content.Shared/Interaction/Events/MeleeAttackAttemptEvent.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace Content.Shared.Interaction.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Raised on directed a weapon when being used in a melee attack.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public struct MeleeAttackAttemptEvent
|
||||
{
|
||||
public bool Cancelled = false;
|
||||
public readonly EntityUid User;
|
||||
|
||||
public MeleeAttackAttemptEvent(EntityUid user)
|
||||
{
|
||||
User = user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user