From 2d709f62946aabe5158834678862398363309c07 Mon Sep 17 00:00:00 2001 From: scrato Date: Mon, 24 May 2021 16:55:48 +0200 Subject: [PATCH] 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 --- .../Components/ActionBlocking/CuffableComponent.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs b/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs index e582389b36..115bc9d2ee 100644 --- a/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs +++ b/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs @@ -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) {