Skip to content

Commit

Permalink
Fix: remove chat bubbles for late at party (#2346)
Browse files Browse the repository at this point in the history
* fix: avoid chat bubbles to show when rendering a player after a message was sent

* minor improvement
  • Loading branch information
davidejensen authored Oct 7, 2024
1 parent 45e43c7 commit 3d2cc01
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Explorer/Assets/DCL/NameTags/Systems/NametagPlacementSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ protected override void Update(float t)
AddTagQuery(World, camera);
ProcessChatBubbleComponentsQuery(World);
UpdateOwnTagQuery(World, camera);
RemoveUnusedChatBubbleComponentsQuery(World);
}

[Query]
Expand Down Expand Up @@ -129,6 +130,15 @@ private void ProcessChatBubbleComponents(Entity e, in ChatBubbleComponent chatBu
World.Remove<ChatBubbleComponent>(e);
}


[Query]
[All(typeof(ChatBubbleComponent))]
//This query is used to remove the ChatBubbleComponent from the entity if the chat bubble has not been displayed
private void RemoveUnusedChatBubbleComponents(Entity e)
{
World.Remove<ChatBubbleComponent>(e);
}

[Query]
private void RemoveTag(NametagView nametagView, in DeleteEntityIntention deleteEntityIntention)
{
Expand Down

0 comments on commit 3d2cc01

Please sign in to comment.