Fix missing entities in round summary window (#23032)

This commit is contained in:
Leon Friedrich
2023-12-27 17:41:58 -05:00
committed by GitHub
parent a608071dda
commit ae243007a8

View File

@@ -125,19 +125,15 @@ namespace Content.Client.RoundEnd
VerticalExpand = true,
};
var playerUid = _entityManager.GetEntity(playerInfo.PlayerNetEntity);
if (_entityManager.HasComponent<SpriteComponent>(playerUid))
if (playerInfo.PlayerNetEntity != null)
{
var spriteView = new SpriteView
{
OverrideDirection = Direction.South,
VerticalAlignment = VAlignment.Center,
SetSize = new Vector2(32, 32),
VerticalExpand = true,
};
spriteView.SetEntity(playerUid);
hBox.AddChild(spriteView);
hBox.AddChild(new SpriteView(playerInfo.PlayerNetEntity.Value, _entityManager)
{
OverrideDirection = Direction.South,
VerticalAlignment = VAlignment.Center,
SetSize = new Vector2(32, 32),
VerticalExpand = true,
});
}
if (playerInfo.PlayerICName != null)