diff --git a/src/console.c b/src/console.c index 41bcdf5b16685277cd6e004fe9b26253c6e913f8..7ad3d55a44354973d9f4ac98b44cb0cb77599384 100644 --- a/src/console.c +++ b/src/console.c @@ -1335,7 +1335,6 @@ static void CON_Print(char *msg) INT32 controlchars = 0; // for color changing char color = '\x80'; // keep color across lines - //TODO: also mute the console in terminal/command line if (msg == NULL || con_muted) return; @@ -1475,6 +1474,10 @@ void CONS_Printf(const char *fmt, ...) // echo console prints to log file DEBFILE(txt); + //also mute the console in terminal/command line AND file, except for DEBFILE above + if (con_muted) + return; + // write message in con text buffer if (con_started) CON_Print(txt); diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 960918d12a03398cb436825aceed9421bf2ae686..3bce28e4dd9f91cfc065e965d23ce0b03fa9aba7 100755 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -5134,10 +5134,12 @@ void TryRunTics(tic_t realtics, tic_t entertic) // it happened once with "battleroyale" lua mod } else - CONS_Printf("Game state buffer is invalid! (simtic %d gametic %d)\n", simtic, gametic); + // CONS_Printf("Game state buffer is invalid! (simtic %d gametic %d)\n", simtic, gametic); + DEBFILE(va("NETPLUS: Game state buffer is invalid! (simtic %d gametic %d)\n", simtic, gametic)); simtic = gametic; - CONS_Printf("Not simulating, clearing savestates...\n"); + // CONS_Printf("Not simulating, clearing savestates...\n"); + DEBFILE("NETPLUS: Not simulating, clearing savestates...\n"); InvalidateSavestates(); } @@ -5191,10 +5193,12 @@ void TryRunTics(tic_t realtics, tic_t entertic) { P_LoadGameState(&gameStateBuffer[gametic % MAXLOCALSAVESTATES]); if (Consistancy() != consistancy[gametic % BACKUPTICS]) - CONS_Alert(CONS_WARNING, "Saved state at %d isn't consistent with recorded checksum\n", gametic); + // CONS_Alert(CONS_WARNING, "Saved state at %d isn't consistent with recorded checksum\n", gametic); + DEBFILE(va("NETPLUS: Saved state at %d isn't consistent with recorded checksum\n", gametic)); } else if (simtic != gametic && !gameStateBufferIsValid[gametic % MAXLOCALSAVESTATES]) - CONS_Alert(CONS_WARNING, "Game state buffer is inaccessible but a simulation happened\n"); + // CONS_Alert(CONS_WARNING, "Game state buffer is inaccessible but a simulation happened\n"); + DEBFILE("NETPLUS: Game state buffer is inaccessible but a simulation happened\n"); // run the count * tics while (neededtic > gametic) @@ -5391,7 +5395,8 @@ static void RunSimulations() { if (!gameStateBufferIsValid[gametic % MAXLOCALSAVESTATES]) { - CONS_Alert(CONS_WARNING, "Can't simulate, save on %d is invalid!\n", gametic); + // CONS_Alert(CONS_WARNING, "Can't simulate, save on %d is invalid!\n", gametic); + DEBFILE(va("NETPLUS: Can't simulate, save on %d is invalid!\n", gametic)); return; // do not simulate if we cannot guarantee a recovery } @@ -5622,7 +5627,8 @@ static void RunSimulations() void InvalidateSavestates() { if (simtic > gametic) - CONS_Printf("Warning: Savestates were invalidated during a simulation!!\n"); + DEBFILE("NETPLUS: Savestates were invalidated during a simulation\n"); + // CONS_Printf("Warning: Savestates were invalidated during a simulation!!\n"); for (int i = 0; i < MAXLOCALSAVESTATES; i++) { diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 0c073866edd56933a54e369f2e83602ee99b5fed..2c54571985cd88e7a42b9629e3c08b5a8c8202c2 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -3175,10 +3175,15 @@ void HU_SetCEchoFlags(INT32 flags) void HU_DoCEcho(const char *msg) { - I_OutputMsg("%s\n", msg); // print to log + if (!con_muted) + { + I_OutputMsg("%s\n", msg); // print to log - strncpy(cechotext, msg, sizeof(cechotext)); - strncat(cechotext, "\\", sizeof(cechotext) - strlen(cechotext) - 1); - cechotext[sizeof(cechotext) - 1] = '\0'; - cechotimer = cechoduration; + strncpy(cechotext, msg, sizeof(cechotext)); + strncat(cechotext, "\\", sizeof(cechotext) - strlen(cechotext) - 1); + cechotext[sizeof(cechotext) - 1] = '\0'; + cechotimer = cechoduration; + } + else + DEBFILE(va("%s\n", msg)); }