diff --git a/Content.Server/GameObjects/Components/Mobs/State/DeadMobState.cs b/Content.Server/GameObjects/Components/Mobs/State/DeadMobState.cs index ebd5a62048..a0562ac755 100644 --- a/Content.Server/GameObjects/Components/Mobs/State/DeadMobState.cs +++ b/Content.Server/GameObjects/Components/Mobs/State/DeadMobState.cs @@ -30,21 +30,6 @@ namespace Content.Server.GameObjects.Components.Mobs.State } EntitySystem.Get().Down(entity); - - if (entity.TryGetComponent(out IPhysBody? physics)) - { - physics.CanCollide = false; - } - } - - public override void ExitState(IEntity entity) - { - base.ExitState(entity); - - if (entity.TryGetComponent(out IPhysBody? physics)) - { - physics.CanCollide = true; - } } } } diff --git a/Content.Shared/GameObjects/Components/Mobs/State/SharedDeadMobState.cs b/Content.Shared/GameObjects/Components/Mobs/State/SharedDeadMobState.cs index dd16b6d2e7..0201e4c124 100644 --- a/Content.Shared/GameObjects/Components/Mobs/State/SharedDeadMobState.cs +++ b/Content.Shared/GameObjects/Components/Mobs/State/SharedDeadMobState.cs @@ -1,10 +1,27 @@ -#nullable enable +using Robust.Shared.GameObjects; + namespace Content.Shared.GameObjects.Components.Mobs.State { public abstract class SharedDeadMobState : BaseMobState { protected override DamageState DamageState => DamageState.Dead; + public override void EnterState(IEntity entity) + { + base.EnterState(entity); + var wake = entity.EnsureComponent(); + wake.Enabled = true; + } + + public override void ExitState(IEntity entity) + { + base.ExitState(entity); + if (entity.HasComponent()) + { + entity.RemoveComponent(); + } + } + public override bool CanInteract() { return false;