Skip to content

Commit

Permalink
Don't disable collision on dead mobs, fixes an issue with pulling (sp…
Browse files Browse the repository at this point in the history
…ace-wizards#30532)

Update MobStateSystem.Subscribers.cs
  • Loading branch information
Dutch-VanDerLinde authored and themias committed Aug 9, 2024
1 parent 102c1d8 commit d716720
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Content.Shared/Mobs/Systems/MobStateSystem.Subscribers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ private void OnStateExitSubscribers(EntityUid target, MobStateComponent componen
case MobState.Dead:
RemComp<CollisionWakeComponent>(target);
_standing.Stand(target);
if (!_standing.IsDown(target) && TryComp<PhysicsComponent>(target, out var physics))
{
_physics.SetCanCollide(target, true, body: physics);
}

break;
case MobState.Invalid:
//unused
Expand Down Expand Up @@ -115,12 +110,6 @@ private void OnStateEnteredSubscribers(EntityUid target, MobStateComponent compo
case MobState.Dead:
EnsureComp<CollisionWakeComponent>(target);
_standing.Down(target);

if (_standing.IsDown(target) && TryComp<PhysicsComponent>(target, out var physics))
{
_physics.SetCanCollide(target, false, body: physics);
}

_appearance.SetData(target, MobStateVisuals.State, MobState.Dead);
break;
case MobState.Invalid:
Expand Down

0 comments on commit d716720

Please sign in to comment.