]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
S_LoadSound now automatically tries both with and without sound/ when loading sounds...
[xonotic/darkplaces.git] / console.c
index 8020de1baaab8863f89136e2c2239f18ab5a2a0f..b5c3a14cd4eccc8a02e33006234794c160241e50 100644 (file)
--- a/console.c
+++ b/console.c
@@ -201,6 +201,11 @@ Log_ConPrint
 */
 void Log_ConPrint (const char *msg)
 {
+       static qboolean inprogress = false;
+       // don't allow feedback loops with memory error reports
+       if (inprogress)
+               return;
+       inprogress = true;
        // Until the host is completely initialized, we maintain a log queue
        // to store the messages, since the log can't be started before
        if (logqueue != NULL)
@@ -224,6 +229,7 @@ void Log_ConPrint (const char *msg)
                memcpy (&logqueue[logq_ind], msg, len);
                logq_ind += len;
 
+               inprogress = false;
                return;
        }
 
@@ -241,6 +247,7 @@ void Log_ConPrint (const char *msg)
                if (log_sync.integer)
                        FS_Flush (logfile);
        }
+       inprogress = false;
 }
 
 
@@ -473,7 +480,7 @@ void Con_PrintToHistory(const char *txt)
        if (txt[0] == 1)
        {
                mask = 128;             // go to colored text
-               S_LocalSound ("misc/talk.wav", true);
+               S_LocalSound ("sound/misc/talk.wav");
        // play talk wav
                txt++;
        }