Ghost hearing action (#19722)
This commit is contained in:
@@ -739,7 +739,7 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
// TODO proper speech occlusion
|
||||
|
||||
var recipients = new Dictionary<ICommonSession, ICChatRecipientData>();
|
||||
var ghosts = GetEntityQuery<GhostComponent>();
|
||||
var ghostHearing = GetEntityQuery<GhostHearingComponent>();
|
||||
var xforms = GetEntityQuery<TransformComponent>();
|
||||
|
||||
var transformSource = xforms.GetComponent(source);
|
||||
@@ -756,9 +756,9 @@ public sealed partial class ChatSystem : SharedChatSystem
|
||||
if (transformEntity.MapID != sourceMapId)
|
||||
continue;
|
||||
|
||||
var observer = ghosts.HasComponent(playerEntity);
|
||||
var observer = ghostHearing.HasComponent(playerEntity);
|
||||
|
||||
// even if they are an observer, in some situations we still need the range
|
||||
// even if they are a ghost hearer, in some situations we still need the range
|
||||
if (sourceCoords.TryDistance(EntityManager, transformEntity.Coordinates, out var distance) && distance < voiceGetRange)
|
||||
{
|
||||
recipients.Add(player, new ICChatRecipientData(distance, observer));
|
||||
|
||||
Reference in New Issue
Block a user