- botlib logfile now gets stored in the fs_game directory in fs_homepath. (patch from Erik Auerswald)
- Added proper error handling when fopening qconsole.log - Fixed bug where r_chat.c gets loaded in botlib even when bot_nochat is 1.
This commit is contained in:
parent
57cc0f901e
commit
e7daf33d8e
3 changed files with 31 additions and 7 deletions
|
@ -181,11 +181,22 @@ void QDECL Com_Printf( const char *fmt, ... ) {
|
|||
newtime = localtime( &aclock );
|
||||
|
||||
logfile = FS_FOpenFileWrite( "qconsole.log" );
|
||||
Com_Printf( "logfile opened on %s\n", asctime( newtime ) );
|
||||
if ( com_logfile->integer > 1 ) {
|
||||
// force it to not buffer so we get valid
|
||||
// data even if we are crashing
|
||||
FS_ForceFlush(logfile);
|
||||
|
||||
if(logfile)
|
||||
{
|
||||
Com_Printf( "logfile opened on %s\n", asctime( newtime ) );
|
||||
|
||||
if ( com_logfile->integer > 1 )
|
||||
{
|
||||
// force it to not buffer so we get valid
|
||||
// data even if we are crashing
|
||||
FS_ForceFlush(logfile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Com_Printf("Opening qconsole.log failed!\n");
|
||||
Cvar_SetValue("logfile", 0);
|
||||
}
|
||||
|
||||
opening_qconsole = qfalse;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue