Chat manager won't enqueue speech bubbles in a different map than you eye.
Fixes #4215
This commit is contained in:
@@ -585,6 +585,10 @@ namespace Content.Client.Chat.Managers
|
|||||||
|
|
||||||
private void EnqueueSpeechBubble(IEntity entity, string contents, SpeechBubble.SpeechType speechType)
|
private void EnqueueSpeechBubble(IEntity entity, string contents, SpeechBubble.SpeechType speechType)
|
||||||
{
|
{
|
||||||
|
// Don't enqueue speech bubbles for other maps. TODO: Support multiple viewports/maps?
|
||||||
|
if (entity.Transform.MapID != _eyeManager.CurrentMap)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!_queuedSpeechBubbles.TryGetValue(entity.Uid, out var queueData))
|
if (!_queuedSpeechBubbles.TryGetValue(entity.Uid, out var queueData))
|
||||||
{
|
{
|
||||||
queueData = new SpeechBubbleQueueData();
|
queueData = new SpeechBubbleQueueData();
|
||||||
@@ -600,8 +604,7 @@ namespace Content.Client.Chat.Managers
|
|||||||
|
|
||||||
private void CreateSpeechBubble(IEntity entity, SpeechBubbleData speechData)
|
private void CreateSpeechBubble(IEntity entity, SpeechBubbleData speechData)
|
||||||
{
|
{
|
||||||
var bubble =
|
var bubble = SpeechBubble.CreateSpeechBubble(speechData.Type, speechData.Message, entity, _eyeManager, this);
|
||||||
SpeechBubble.CreateSpeechBubble(speechData.Type, speechData.Message, entity, _eyeManager, this);
|
|
||||||
|
|
||||||
if (_activeSpeechBubbles.TryGetValue(entity.Uid, out var existing))
|
if (_activeSpeechBubbles.TryGetValue(entity.Uid, out var existing))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user