]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Glorfcode (#22271)
authorKP <13428215+nok-ko@users.noreply.github.com>
Mon, 11 Dec 2023 08:53:10 +0000 (00:53 -0800)
committerGitHub <noreply@github.com>
Mon, 11 Dec 2023 08:53:10 +0000 (19:53 +1100)
Content.Client/UserInterface/Systems/Chat/ChatUIController.cs

index e5393944169449602c3c7239cfbcfc0366352ec3..772c999130dbde23ad62517de319afc1c92782aa 100644 (file)
@@ -706,17 +706,14 @@ public sealed class ChatUIController : UIController
 
     private void OnDamageForceSay(DamageForceSayEvent ev, EntitySessionEventArgs _)
     {
-        if (UIManager.ActiveScreen?.GetWidget<ChatBox>() is not { } chatBox)
-            return;
-
+        var chatBox = UIManager.ActiveScreen?.GetWidget<ChatBox>() ?? UIManager.ActiveScreen?.GetWidget<ResizableChatBox>();
         // Don't send on OOC/LOOC obviously!
-        if (chatBox.SelectedChannel is not
-            (ChatSelectChannel.Local or
+        if (chatBox?.SelectedChannel is not (ChatSelectChannel.Local or
             ChatSelectChannel.Radio or
             ChatSelectChannel.Whisper))
             return;
 
-        if (_player.LocalPlayer?.ControlledEntity is not { } ent
+        if (_player.LocalSession?.AttachedEntity is not { } ent
             || !EntityManager.TryGetComponent<DamageForceSayComponent>(ent, out var forceSay))
             return;