File tree Expand file tree Collapse file tree
src/game/client/components/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ void CChatBubbles::RemoveBubble(int ClientId, CBubble Bubble)
139139 if (*it == Bubble)
140140 {
141141 TextRender ()->DeleteTextContainer (it->m_TextContainerIndex );
142+ it->m_TextContainerIndex .Reset ();
142143 m_avChatBubbles[ClientId].erase (it);
143144 UpdateBubbleOffsets (ClientId);
144145 return ;
@@ -304,17 +305,14 @@ void CChatBubbles::OnRender()
304305
305306void CChatBubbles::Reset ()
306307{
307- if (m_avChatBubbles->empty ())
308- return ;
309-
310308 for (int ClientId = 0 ; ClientId < MAX_CLIENTS; ++ClientId)
311309 {
312310 for (auto &Bubble : m_avChatBubbles[ClientId])
313311 {
314312 if (Bubble.m_TextContainerIndex .Valid ())
315313 {
316314 TextRender ()->DeleteTextContainer (Bubble.m_TextContainerIndex );
317- Bubble.m_TextContainerIndex = STextContainerIndex ();
315+ Bubble.m_TextContainerIndex . Reset ();
318316 }
319317 Bubble.m_Cursor .m_FontSize = 0 ;
320318 }
@@ -350,7 +348,7 @@ void CChatBubbles::SetupTextcontainer(CBubble &Bubble)
350348 if (Bubble.m_TextContainerIndex .Valid ())
351349 {
352350 TextRender ()->DeleteTextContainer (Bubble.m_TextContainerIndex );
353- Bubble.m_TextContainerIndex = STextContainerIndex ();
351+ Bubble.m_TextContainerIndex . Reset ();
354352 }
355353
356354 CTextCursor Cursor;
You can’t perform that action at this time.
0 commit comments