]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix broken state when attempting to escape a locker while cuffed (#42313)
authorTayrtahn <tayrtahn@gmail.com>
Thu, 8 Jan 2026 21:18:23 +0000 (16:18 -0500)
committerGitHub <noreply@github.com>
Thu, 8 Jan 2026 21:18:23 +0000 (21:18 +0000)
Check that the DoAfter starts successfully instead of just assuming it does.

Content.Server/Resist/ResistLockerSystem.cs

index 3698306b31e47240cd4252727fa82ce717836aea..df77dcb2727c5f238a6e7fc7029053966e9ceb60 100644 (file)
@@ -57,9 +57,12 @@ public sealed class ResistLockerSystem : EntitySystem
             NeedHand = false, //No hands 'cause we be kickin'
         };
 
+        // Make sure the do after is able to start
+        if (!_doAfterSystem.TryStartDoAfter(doAfterEventArgs))
+            return;
+
         resistLockerComponent.IsResisting = true;
         _popupSystem.PopupEntity(Loc.GetString("resist-locker-component-start-resisting"), user, user, PopupType.Large);
-        _doAfterSystem.TryStartDoAfter(doAfterEventArgs);
     }
 
     private void OnDoAfter(EntityUid uid, ResistLockerComponent component, DoAfterEvent args)