Skip to content

Commit

Permalink
Removed unnecessary if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
impubbi committed Jan 29, 2025
1 parent f4dac41 commit 4ded7be
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Content.Shared/Ensnaring/SharedEnsnareableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,10 @@ public bool TryEnsnare(EntityUid target, EntityUid ensnare, EnsnaringComponent c

Container.Insert(ensnare, ensnareable.Container);

// Apply stamina damage to target if they weren't ensnared before.
if (ensnareable.IsEnsnared != true)
// Apply stamina damage to target
if (TryComp<StaminaComponent>(target, out var stamina))
{
if (TryComp<StaminaComponent>(target, out var stamina))
{
_stamina.TakeStaminaDamage(target, component.StaminaDamage, with: ensnare, component: stamina);
}
_stamina.TakeStaminaDamage(target, component.StaminaDamage, with: ensnare, component: stamina);
}

component.Ensnared = target;
Expand Down

0 comments on commit 4ded7be

Please sign in to comment.