Remove IMobStateComponent (#5220)

This commit is contained in:
Javier Guardia Fernández
2021-11-08 15:11:58 +01:00
committed by GitHub
parent 4236551d86
commit f5b11d6af8
35 changed files with 84 additions and 144 deletions

View File

@@ -2,7 +2,7 @@ using System.Collections.Generic;
using Content.Shared.ActionBlocker;
using Content.Shared.CCVar;
using Content.Shared.Friction;
using Content.Shared.MobState;
using Content.Shared.MobState.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Pulling.Components;
using Robust.Shared.Configuration;
@@ -160,7 +160,7 @@ namespace Content.Shared.Movement
protected bool UseMobMovement(PhysicsComponent body)
{
return body.BodyStatus == BodyStatus.OnGround &&
body.Owner.HasComponent<IMobStateComponent>() &&
body.Owner.HasComponent<MobStateComponent>() &&
// If we're being pulled then don't mess with our velocity.
(!body.Owner.TryGetComponent(out SharedPullableComponent? pullable) || !pullable.BeingPulled) &&
_blocker.CanMove(body.Owner);