Make dead bodies use CollisionWake (#4119)
* Make dead bodies use CollisionWake * Disable CanCollide fuckery * Update Content.Shared/GameObjects/Components/Mobs/State/SharedDeadMobState.cs Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -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<CollisionWakeComponent>();
|
||||
wake.Enabled = true;
|
||||
}
|
||||
|
||||
public override void ExitState(IEntity entity)
|
||||
{
|
||||
base.ExitState(entity);
|
||||
if (entity.HasComponent<CollisionWakeComponent>())
|
||||
{
|
||||
entity.RemoveComponent<CollisionWakeComponent>();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanInteract()
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user