Fix: #4037 Being able to dehandcuff yourself while dead (#4062)

* Fix #4037 (dead handcuffs)

* check ActionBlocker.CanInteract

* Removed unnecessary using

Co-authored-by: Michael Will <will_m@outlook.de>
This commit is contained in:
scrato
2021-05-24 16:55:48 +02:00
committed by GitHub
parent ff79613517
commit 2d709f6294

View File

@@ -206,7 +206,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking
return;
}
if (!isOwner && !ActionBlockerSystem.CanInteract(user))
if (!ActionBlockerSystem.CanInteract(user))
{
user.PopupMessage(Loc.GetString("You can't do that!"));
return;
@@ -237,7 +237,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking
if (cuff.StartUncuffSound != null)
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartUncuffSound, Owner);
}
var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime;
var doAfterEventArgs = new DoAfterEventArgs(user, uncuffTime)
{