Remove some obsoleted transform methods/properties (#13457)

This commit is contained in:
Leon Friedrich
2023-01-14 13:48:48 +13:00
committed by GitHub
parent a98a80f938
commit 899549b770
5 changed files with 18 additions and 13 deletions

View File

@@ -123,15 +123,16 @@ namespace Content.IntegrationTests.Tests
private static bool IsDescendant(EntityUid descendant, EntityUid parent)
{
var tmpParent = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(descendant).Parent;
while (tmpParent != null)
var xforms = IoCManager.Resolve<IEntityManager>().GetEntityQuery<TransformComponent>();
var tmpParent = xforms.GetComponent(descendant).ParentUid;
while (tmpParent.IsValid())
{
if (tmpParent.Owner == parent)
if (tmpParent == parent)
{
return true;
}
tmpParent = tmpParent.Parent;
tmpParent = xforms.GetComponent(tmpParent).ParentUid;
}
return false;