diff --git a/Robust.Client/GameObjects/EntitySystems/RenderingTreeSystem.cs b/Robust.Client/GameObjects/EntitySystems/RenderingTreeSystem.cs index a0aa37a3af..bfc07895b4 100644 --- a/Robust.Client/GameObjects/EntitySystems/RenderingTreeSystem.cs +++ b/Robust.Client/GameObjects/EntitySystems/RenderingTreeSystem.cs @@ -102,9 +102,9 @@ namespace Robust.Client.GameObjects.EntitySystems QueueUpdateLight(light); } - foreach (var child in entity.Transform.Children) + foreach (var child in entity.Transform.ChildEntityUids) { - UpdateEntity(child.Owner); + UpdateEntity(EntityManager.GetEntity(child)); } } @@ -131,7 +131,7 @@ namespace Robust.Client.GameObjects.EntitySystems newMapTrees?.SpriteTree.AddOrUpdate(sprite); } - + if (ev.Entity.TryGetComponent(out PointLightComponent? light)) { oldMapTrees?.LightTree.Remove(light); diff --git a/Robust.Client/Graphics/Clyde/Clyde.HLR.cs b/Robust.Client/Graphics/Clyde/Clyde.HLR.cs index a6169a69ea..3bba2c2aa2 100644 --- a/Robust.Client/Graphics/Clyde/Clyde.HLR.cs +++ b/Robust.Client/Graphics/Clyde/Clyde.HLR.cs @@ -233,6 +233,8 @@ namespace Robust.Client.Graphics.Clyde } } + ArrayPool.Shared.Return(indexList); + _drawingSpriteList.Clear(); FlushRenderQueue(); diff --git a/Robust.Shared/GameObjects/EntityManager.cs b/Robust.Shared/GameObjects/EntityManager.cs index 804f28fecf..8e506c9728 100644 --- a/Robust.Shared/GameObjects/EntityManager.cs +++ b/Robust.Shared/GameObjects/EntityManager.cs @@ -613,9 +613,9 @@ namespace Robust.Shared.GameObjects ++necessary; } - foreach (var childTx in entity.Transform.Children) + foreach (var childTx in entity.Transform.ChildEntityUids) { - if (UpdateEntityTree(childTx.Owner)) + if (UpdateEntityTree(GetEntity(childTx))) { ++necessary; }