global radio toggle for observers (#22137)
This commit is contained in:
@@ -103,8 +103,12 @@ public sealed class RadioSystem : EntitySystem
|
||||
var radioQuery = EntityQueryEnumerator<ActiveRadioComponent, TransformComponent>();
|
||||
while (canSend && radioQuery.MoveNext(out var receiver, out var radio, out var transform))
|
||||
{
|
||||
if (!radio.Channels.Contains(channel.ID) || (TryComp<IntercomComponent>(receiver, out var intercom) && !intercom.SupportedChannels.Contains(channel.ID)))
|
||||
continue;
|
||||
if (!radio.ReceiveAllChannels)
|
||||
{
|
||||
if (!radio.Channels.Contains(channel.ID) || (TryComp<IntercomComponent>(receiver, out var intercom) &&
|
||||
!intercom.SupportedChannels.Contains(channel.ID)))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!channel.LongRange && transform.MapID != sourceMapId && !radio.GlobalReceive)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user