]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
fix hl sprite types again
[xonotic/darkplaces.git] / console.c
index 72dfd9e0a64aca901375ba0f155a3da55a6cb307..28229e2d1aabbf4595673542e72f8b707568984b 100644 (file)
--- a/console.c
+++ b/console.c
@@ -138,7 +138,7 @@ void Log_Open (void)
        if (logfile != NULL || log_file.string[0] == '\0')
                return;
 
-       logfile = FS_Open (log_file.string, "ab", false);
+       logfile = FS_Open (log_file.string, "ab", false, false);
        if (logfile != NULL)
        {
                strlcpy (crt_log_file, log_file.string, sizeof (crt_log_file));
@@ -252,7 +252,7 @@ void Log_Printf (const char *logfilename, const char *fmt, ...)
 {
        qfile_t *file;
 
-       file = FS_Open (logfilename, "ab", true);
+       file = FS_Open (logfilename, "ab", true, false);
        if (file != NULL)
        {
                va_list argptr;
@@ -456,8 +456,6 @@ void Con_PrintToHistory(const char *txt)
        if (txt[0] == 1)
        {
                mask = 128;             // go to colored text
-               S_LocalSound ("sound/misc/talk.wav");
-       // play talk wav
                txt++;
        }
        else if (txt[0] == 2)
@@ -525,6 +523,11 @@ void Con_PrintToHistory(const char *txt)
                }
 
        }
+
+       if( txt[0] == 1 ) {
+               // play talk wav
+               S_LocalSound ("sound/misc/talk.wav");
+       }
 }
 
 /* The translation table between the graphical font and plain ASCII  --KB */
@@ -721,8 +724,8 @@ static void _Con_DrawString( float x, float y, const char *text, int maxlen, flo
                // iterate until we get the next color tag or reach the end of the text part to draw
                for( ; len && *last != _con_color_tag ; len--, last++ )
                        ;
-               // dont do anything if we havent read anything yet
-               if( last != text ) {
+               // only draw the partial string if we have read anything
+               if( last != first ) {
                        // draw the string
                        DrawQ_String( x, y, first, last - first, scalex, scaley, color[0], color[1], color[2], color[3], flags );
                        // update x to be at the new start position
@@ -752,7 +755,7 @@ static void _Con_DrawString( float x, float y, const char *text, int maxlen, flo
                        color = _con_colors[index];
                        // we dont want to display the color tag and the color index
                        first = last;
-               } 
+               }
        }
 }
 
@@ -907,7 +910,7 @@ void Con_DrawConsole (int lines)
 
        rows = (lines-16)>>3;           // rows of text to draw
        y = lines - 16 - (rows<<3);     // may start slightly negative
-    
+
        for (i = con_current - rows + 1;i <= con_current;i++, y += 8)
        {
                j = max(i - con_backscroll, 0);