Skip to content

Commit

Permalink
quick working hotfix2
Browse files Browse the repository at this point in the history
  • Loading branch information
TokenStyle committed Nov 26, 2024
1 parent fcd3d0c commit 7500817
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Content.Shared/Mobs/Systems/MobStateSystem.StateMachine.cs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -107,15 +107,15 @@ private void ChangeState(EntityUid target, MobStateComponent component, MobState
if (oldState == MobState.Dead && HasComp<DebrainedComponent>(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);
Expand Down

0 comments on commit 7500817

Please sign in to comment.