From 75008175c0c2baf93197ca78eafe0ca66aa08c24 Mon Sep 17 00:00:00 2001 From: Token <56667933+TokenStyle@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:22:17 +0500 Subject: [PATCH] quick working hotfix2 --- .../Mobs/Systems/MobStateSystem.StateMachine.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Content.Shared/Mobs/Systems/MobStateSystem.StateMachine.cs b/Content.Shared/Mobs/Systems/MobStateSystem.StateMachine.cs index f8ff1943ec6..54504256d5b 100644 --- a/Content.Shared/Mobs/Systems/MobStateSystem.StateMachine.cs +++ b/Content.Shared/Mobs/Systems/MobStateSystem.StateMachine.cs @@ -1,4 +1,4 @@ -using Content.Shared.Backmen.Surgery.Body; +using Content.Shared.Backmen.Surgery.Body; using Content.Shared.Database; using Content.Shared.Mobs.Components; @@ -107,15 +107,15 @@ private void ChangeState(EntityUid target, MobStateComponent component, MobState if (oldState == MobState.Dead && HasComp(target)) return; - OnExitState(target, component, oldState); - component.CurrentState = newState; - OnEnterState(target, component, newState); - // Backmen: Laying system if (_net.IsClient && (oldState == MobState.Dead || oldState == MobState.Critical)) return; // Backme: Laying system + OnExitState(target, component, oldState); + component.CurrentState = newState; + OnEnterState(target, component, newState); + var ev = new MobStateChangedEvent(target, component, oldState, newState, origin); OnStateChanged(target, component, oldState, newState); RaiseLocalEvent(target, ev, true);