diff --git a/Content.Client/Lobby/LobbyUIController.cs b/Content.Client/Lobby/LobbyUIController.cs index 9eb259657d..a1cebb8de1 100644 --- a/Content.Client/Lobby/LobbyUIController.cs +++ b/Content.Client/Lobby/LobbyUIController.cs @@ -165,7 +165,7 @@ public sealed class LobbyUIController : UIController, IOnStateEntered(_previewDummy, out _)) + var controller = UserInterfaceManager.GetUIController(); + var dummy = controller.GetPreviewDummy(); + + if (!dummy.HasValue) + return; + + if (!_entMan.TryGetComponent(dummy, out _)) { HeightContainer.Visible = false; return; @@ -48,11 +54,19 @@ public sealed partial class HumanoidProfileEditor _height.Value = Profile.Appearance.Height; UpdateHeightText(); + + SetDirty(); } public void SetDummyHeight(byte height, bool changeHeightValue = true) { - if (Profile is null || !_entMan.TryGetComponent(_previewDummy, out var a)) + var controller = UserInterfaceManager.GetUIController(); + var dummy = controller.GetPreviewDummy(); + + if (!dummy.HasValue) + return; + + if (Profile is null || !_entMan.TryGetComponent(dummy, out var a)) return; if(changeHeightValue) @@ -62,7 +76,7 @@ public sealed partial class HumanoidProfileEditor UpdateHeightText(); - IsDirty = true; + SetDirty(); } public void UpdateHeightText()