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:
|
case MobState.Dead:
|
||||||
RemComp<CollisionWakeComponent>(target);
|
RemComp<CollisionWakeComponent>(target);
|
||||||
_standing.Stand(target);
|
_standing.Stand(target);
|
||||||
if (!_standing.IsDown(target) && TryComp<PhysicsComponent>(target, out var physics))
|
|
||||||
{
|
|
||||||
_physics.SetCanCollide(target, true, body: physics);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MobState.Invalid:
|
case MobState.Invalid:
|
||||||
//unused
|
//unused
|
||||||
@@ -115,12 +110,6 @@ public partial class MobStateSystem
|
|||||||
case MobState.Dead:
|
case MobState.Dead:
|
||||||
EnsureComp<CollisionWakeComponent>(target);
|
EnsureComp<CollisionWakeComponent>(target);
|
||||||
_standing.Down(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);
|
_appearance.SetData(target, MobStateVisuals.State, MobState.Dead);
|
||||||
break;
|
break;
|
||||||
case MobState.Invalid:
|
case MobState.Invalid:
|
||||||
|
|||||||
Reference in New Issue
Block a user