From 724c9f7d0ecada36b942e12edacda86cd49254dd Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 1 Jan 2025 17:25:09 +0000 Subject: [PATCH] stop carrying if you get downed (#2576) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Shared/_DV/Carrying/CarryingSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Shared/_DV/Carrying/CarryingSystem.cs b/Content.Shared/_DV/Carrying/CarryingSystem.cs index c6758ad4b9e..095bbf27e39 100644 --- a/Content.Shared/_DV/Carrying/CarryingSystem.cs +++ b/Content.Shared/_DV/Carrying/CarryingSystem.cs @@ -57,6 +57,7 @@ public override void Initialize() SubscribeLocalEvent(OnThrow); SubscribeLocalEvent(OnParentChanged); SubscribeLocalEvent(OnMobStateChanged); + SubscribeLocalEvent(OnDowned); SubscribeLocalEvent(OnInteractionAttempt); SubscribeLocalEvent(OnMoveAttempt); SubscribeLocalEvent(OnStandAttempt); @@ -158,6 +159,11 @@ private void OnMobStateChanged(Entity ent, ref MobStateChange DropCarried(ent, ent.Comp.Carried); } + private void OnDowned(Entity ent, ref DownedEvent args) + { + DropCarried(ent, ent.Comp.Carried); + } + /// /// Only let the person being carried interact with their carrier and things on their person. ///