Fix mobs playing a falling sound when dying from crit (#2425)

* Fix falling sound playing twice when dying

* But actually
This commit is contained in:
DrSmugleaf
2020-10-29 10:26:23 +01:00
committed by GitHub
parent 650e7385b9
commit ec25dbe4a7
5 changed files with 10 additions and 18 deletions

View File

@@ -1,10 +1,10 @@
using Content.Server.GameObjects.Components.Body;
using Content.Server.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Body;
using Content.Server.GameObjects.Components.Damage;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.GameObjects.Components.Mobs.State;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.GameObjects.Components.Mobs.State
@@ -13,6 +13,8 @@ namespace Content.Server.GameObjects.Components.Mobs.State
{
public override void EnterState(IEntity entity)
{
EntitySystem.Get<StandingStateSystem>().Standing(entity);
if (entity.TryGetComponent(out AppearanceComponent appearance))
{
appearance.SetData(DamageStateVisuals.State, DamageState.Alive);