]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Put wrapped msgs at the correct position when hud_panel_centerprint_flip is set
authorterencehill <piuntn@gmail.com>
Sun, 26 Jun 2011 21:41:05 +0000 (23:41 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 26 Jun 2011 21:41:05 +0000 (23:41 +0200)
qcsrc/client/hud.qc

index da0ffbb15a1dac8e9f86822e47870d1a5e58767c..f0c838e50d0d538f632b353774065ca65330fe35 100644 (file)
@@ -4547,15 +4547,18 @@ void HUD_CenterPrint (void)
                        for(k = 0; k < n; ++k)
                        {
                                getWrappedLine_remaining = argv(k);
-                               ts = getWrappedLine(panel_size_x * sz, fontsize, stringwidth_colors);
-                               if (ts != "")
-                                       pos_y -= fontsize_y;
-                               else
-                                       pos_y -= fontsize_y * 0.35;
-                               if (pos_y < panel_pos_y) // check if the next line can be shown
+                               while(getWrappedLine_remaining)
                                {
-                                       drawfontscale = '1 1 0';
-                                       return;
+                                       ts = getWrappedLine(panel_size_x * sz, fontsize, stringwidth_colors);
+                                       if (ts != "")
+                                               pos_y -= fontsize_y;
+                                       else
+                                               pos_y -= fontsize_y * 0.35;
+                                       if (pos_y < panel_pos_y) // check if the next line can be shown
+                                       {
+                                               drawfontscale = '1 1 0';
+                                               return;
+                                       }
                                }
                        }
                        current_msg_pos_y = pos_y; // save starting pos (first line) of the current message