Don't disable collision on dead mobs, fixes an issue with pulling (#30532)
Update MobStateSystem.Subscribers.cs
This commit is contained in:
@@ -80,11 +80,6 @@ public partial class MobStateSystem
|
||||
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
|
||||
@@ -115,12 +110,6 @@ public partial class MobStateSystem
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user