]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
tweak(BurialSystem): Don't cancel doafter on keyup (#30507)
authorBrandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
Fri, 2 Aug 2024 05:57:18 +0000 (05:57 +0000)
committerGitHub <noreply@github.com>
Fri, 2 Aug 2024 05:57:18 +0000 (15:57 +1000)
Content.Shared/Burial/BurialSystem.cs

index 5cf7d8820e9109676d91432299a52bf4f0e0b562..c86b2ec024873ee0e6b5384b2d123a56c8930e2e 100644 (file)
@@ -160,7 +160,7 @@ public sealed class BurialSystem : EntitySystem
     {
         // We track a separate doAfter here, as we want someone with a shovel to
         // be able to come along and help someone trying to claw their way out
-        if (component.HandDiggingDoAfter != null)
+        if (_doAfterSystem.IsRunning(component.HandDiggingDoAfter))
             return;
 
         if (!_actionBlocker.CanMove(args.Entity))
@@ -178,7 +178,7 @@ public sealed class BurialSystem : EntitySystem
         if (component.Stream == null)
             component.Stream = _audioSystem.PlayPredicted(component.DigSound, uid, args.Entity)?.Entity;
 
-        if (!_doAfterSystem.TryStartDoAfter(doAfterEventArgs))
+        if (!_doAfterSystem.TryStartDoAfter(doAfterEventArgs, out component.HandDiggingDoAfter))
         {
             _audioSystem.Stop(component.Stream);
             return;