Optimise high pressure movements slightly (#6287)

This commit is contained in:
metalgearsloth
2022-01-26 22:17:15 +11:00
committed by GitHub
parent 40c406c40d
commit 48e075b67e
4 changed files with 12 additions and 22 deletions

View File

@@ -110,18 +110,4 @@ namespace Content.Server.Atmos.Components
}
}
}
public static class MovedByPressureExtensions
{
public static bool IsMovedByPressure(this EntityUid entity)
{
return entity.IsMovedByPressure(out _);
}
public static bool IsMovedByPressure(this EntityUid entity, [NotNullWhen(true)] out MovedByPressureComponent? moved)
{
return IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out moved) &&
moved.Enabled;
}
}
}