Fix mob state error (#21431)
This commit is contained in:
@@ -70,6 +70,11 @@ public partial class MobStateSystem
|
||||
|
||||
private void OnStateEnteredSubscribers(EntityUid target, MobStateComponent component, MobState state)
|
||||
{
|
||||
// All of the state changes here should already be networked, so we do nothing if we are currently applying a
|
||||
// server state.
|
||||
if (_timing.ApplyingState)
|
||||
return;
|
||||
|
||||
_blocker.UpdateCanMove(target); //update movement anytime a state changes
|
||||
switch (state)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Standing;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared.Mobs.Systems;
|
||||
|
||||
@@ -16,6 +17,7 @@ public partial class MobStateSystem : EntitySystem
|
||||
[Dependency] private readonly StandingStateSystem _standing = default!;
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly ILogManager _logManager = default!;
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
private ISawmill _sawmill = default!;
|
||||
|
||||
public override void Initialize()
|
||||
|
||||
Reference in New Issue
Block a user