Fix Glorfcode (#22271)
This commit is contained in:
@@ -706,17 +706,14 @@ public sealed class ChatUIController : UIController
|
|||||||
|
|
||||||
private void OnDamageForceSay(DamageForceSayEvent ev, EntitySessionEventArgs _)
|
private void OnDamageForceSay(DamageForceSayEvent ev, EntitySessionEventArgs _)
|
||||||
{
|
{
|
||||||
if (UIManager.ActiveScreen?.GetWidget<ChatBox>() is not { } chatBox)
|
var chatBox = UIManager.ActiveScreen?.GetWidget<ChatBox>() ?? UIManager.ActiveScreen?.GetWidget<ResizableChatBox>();
|
||||||
return;
|
|
||||||
|
|
||||||
// Don't send on OOC/LOOC obviously!
|
// Don't send on OOC/LOOC obviously!
|
||||||
if (chatBox.SelectedChannel is not
|
if (chatBox?.SelectedChannel is not (ChatSelectChannel.Local or
|
||||||
(ChatSelectChannel.Local or
|
|
||||||
ChatSelectChannel.Radio or
|
ChatSelectChannel.Radio or
|
||||||
ChatSelectChannel.Whisper))
|
ChatSelectChannel.Whisper))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_player.LocalPlayer?.ControlledEntity is not { } ent
|
if (_player.LocalSession?.AttachedEntity is not { } ent
|
||||||
|| !EntityManager.TryGetComponent<DamageForceSayComponent>(ent, out var forceSay))
|
|| !EntityManager.TryGetComponent<DamageForceSayComponent>(ent, out var forceSay))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user