hedgewars/uChat.pas
changeset 11835 8f7e28428f3e
parent 11776 f2031643fe98
child 12102 51596d30a724
--- a/hedgewars/uChat.pas	Tue Jun 21 15:37:08 2016 -0400
+++ b/hedgewars/uChat.pas	Tue Jun 21 22:03:09 2016 +0200
@@ -70,7 +70,7 @@
 
 
 const
-    colors: array[#0..#12] of TSDL_Color = (
+    colors: array[#0..#9] of TSDL_Color = (
             (r:$FF; g:$FF; b:$FF; a:$FF), // #0 unused, feel free to take it for anything
             (r:$FF; g:$FF; b:$FF; a:$FF), // #1 chat message [White]
             (r:$FF; g:$00; b:$FF; a:$FF), // #2 action message [Purple]
@@ -80,10 +80,7 @@
             (r:$00; g:$FF; b:$FF; a:$FF), // #6 input line [Light Blue]
             (r:$FF; g:$80; b:$80; a:$FF), // #7 team gone [Light Red]
             (r:$FF; g:$D0; b:$80; a:$FF), // #8 team back [Light Orange]
-            (r:$DF; g:$DF; b:$DF; a:$FF), // #9 hog speech [Light Gray]
-            (r:$FF; g:$00; b:$FF; a:$AF), // #10 music credits [Purple]
-            (r:$00; g:$FF; b:$FF; a:$AF), // #11 map credits [Light Blue]
-            (r:$FF; g:$D0; b:$80; a:$AF)  // #12 theme credits [Light Orange]
+            (r:$DF; g:$DF; b:$DF; a:$FF)  // #9 hog speech [Light Gray]
             );
     ChatCommandz: array [TChatCmd] of record
             ChatCmd: string[31];
@@ -208,13 +205,10 @@
 end;
 
 const ClDisplayDuration = 12500;
-      CreditsDisplayDur =  2500;
 
 procedure SetLine(var cl: TChatLine; str: shortstring; isInput: boolean);
 var color  : TSDL_Color;
-    credits: boolean;
 begin
-credits:= false;
 if isInput then
     begin
     cl.s:= str;
@@ -226,7 +220,6 @@
     if str[1] <= High(colors) then
         begin
         color:= colors[str[1]];
-        credits:= (str[1] >= #10) and (str[1] <= #12);
         delete(str, 1, 1);
         end
     // fallback if invalid color
@@ -241,10 +234,7 @@
 // set texture, note: variables cl.s and str will be different here if isInput
 RenderChatLineTex(cl, str);
 
-if credits then
-    cl.Time:= RealTicks + CreditsDisplayDur
-else
-    cl.Time:= RealTicks + ClDisplayDuration;
+cl.Time:= RealTicks + ClDisplayDuration;
 end;
 
 // For uStore texture recreation