Only recreate texture for non-empty lines
authornemo
Mon, 14 Nov 2011 18:28:05 -0500
changeset 6381 5f3412f6809e
parent 6380 1ff5ad1d771b
child 6382 0e76c5cd4250
Only recreate texture for non-empty lines
hedgewars/uChat.pas
--- a/hedgewars/uChat.pas	Mon Nov 14 18:08:36 2011 -0500
+++ b/hedgewars/uChat.pas	Mon Nov 14 18:28:05 2011 -0500
@@ -102,10 +102,16 @@
 
 // For uStore texture recreation
 procedure ReloadLines;
-var i: LongWord;
+var i, t: LongWord;
 begin
-    SetLine(InputStr, InputStr.s, true);
-    for i:= 0 to MaxStrIndex do SetLine(Strs[i], Strs[i].s, false)
+    if InputStr.s <> '' then SetLine(InputStr, InputStr.s, true);
+    for i:= 0 to MaxStrIndex do
+        if Strs[i].s <> '' then
+            begin
+            t:= Strs[i].Time;
+            SetLine(Strs[i], Strs[i].s, false);
+            Strs[i].Time:= t
+            end;
 end;
 
 procedure AddChatString(s: shortstring);