]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Ensure speech bubble cap is always respected (#32223)
authorEvelyn Gordon <evelyn.gordon20@gmail.com>
Mon, 10 Mar 2025 12:28:08 +0000 (08:28 -0400)
committerGitHub <noreply@github.com>
Mon, 10 Mar 2025 12:28:08 +0000 (13:28 +0100)
Ensure speech bubble cap is respected, even when messages are sent very fast

Content.Client/UserInterface/Systems/Chat/ChatUIController.cs

index 8f66340a30fedc340d788c6f31a7a624ad585ab5..8d96a5d6706648ae327d450281a3d5bb1e6980c5 100644 (file)
@@ -467,8 +467,9 @@ public sealed class ChatUIController : UIController
 
         if (existing.Count > SpeechBubbleCap)
         {
-            // Get the oldest to start fading fast.
-            var last = existing[0];
+            // Get the next speech bubble to fade
+            // Any speech bubbles before it are already fading
+            var last = existing[^(SpeechBubbleCap + 1)];
             last.FadeNow();
         }
     }