]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix missing entities in round summary window (#23032)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Wed, 27 Dec 2023 22:41:58 +0000 (17:41 -0500)
committerGitHub <noreply@github.com>
Wed, 27 Dec 2023 22:41:58 +0000 (09:41 +1100)
Content.Client/RoundEnd/RoundEndSummaryWindow.cs

index b12ebe1807c9dd21813eb04964ad782a6e643bce..bb75d75d75e73dd52b7a607d57c4d63eac42b9da 100644 (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)