diff --git a/d1x.ini b/d1x.ini index 1fb72c831..35ad5c1de 100755 --- a/d1x.ini +++ b/d1x.ini @@ -58,6 +58,5 @@ ;-hudlog ;Start hudlog immediatly ;-hudlog_multi ;Start hudlog upon entering multiplayer games ;-hudlogdir ;Log hud messages in directory -;-hudlogstdout ;Log hud messages to stdout ;-hudlines ;Number of hud messages to show -;-msgcolorlevel ;Level of colorization for hud messages (0-3) \ No newline at end of file +;-msgcolorlevel ;Level of colorization for hud messages (0-3) diff --git a/main/hudlog.c b/main/hudlog.c index e4c9295f1..ab6b3048e 100755 --- a/main/hudlog.c +++ b/main/hudlog.c @@ -16,7 +16,6 @@ #include "d_slash.h" //end this section addition -VR -int HUD_log_messages = 0; int HUD_log_multi_autostart = 0; int HUD_log_autostart = 0; int fhudmulti = 0; @@ -116,40 +115,35 @@ void hud_log_message(char * message){ } } --recurse_flag; - if (HUD_log_messages||fhudlog){ - time_t t; - struct tm *lt; - t=time(NULL); - lt=localtime(&t); -//02/06/99 Matthew Mueller - added zero padding to hour - if (HUD_log_messages) - printf("%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec); - if (fhudlog) - fprintf(fhudlog,"%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec); - while (*message){ - if (*message>=0x01 && *message<=0x03){//filter out color codes - message++; - if (!*message)break; - }else if (*message>=0x04 && *message<=0x06){//filter out color reset code - }else{ - if (HUD_log_messages) - printf("%c",*message); - if (fhudlog) - fprintf(fhudlog,"%c",*message); - } - message++; - } - if (HUD_log_messages) - printf("\n"); - if (fhudlog){ - fprintf(fhudlog,"\n"); - //added 05/17/99 Matt Mueller - flush file to make sure it all gets out there - fflush(fhudlog); - //end addition -MM + time_t t; + struct tm *lt; + t=time(NULL); + lt=localtime(&t); +//02/06/99 Matthew Mueller - added zero padding to hour + printf("%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec); + if (fhudlog) + fprintf(fhudlog,"%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec); + while (*message){ + if (*message>=0x01 && *message<=0x03){//filter out color codes + message++; + if (!*message)break; + }else if (*message>=0x04 && *message<=0x06){//filter out color reset code + }else{ + printf("%c",*message); + if (fhudlog) + fprintf(fhudlog,"%c",*message); } -//end edit -MM + message++; } + printf("\n"); + if (fhudlog){ + fprintf(fhudlog,"\n"); + //added 05/17/99 Matt Mueller - flush file to make sure it all gets out there + fflush(fhudlog); + //end addition -MM + } +//end edit -MM } void kmatrix_print(FILE* out,int *sorted){ @@ -211,7 +205,7 @@ void kmatrix_log(int fhudonly){ if (fhudlog) kmatrix_print(fhudlog,sorted); - if (HUD_log_messages && !fhudonly) + if (!fhudonly) kmatrix_print(stdout,sorted); #endif } diff --git a/main/hudlog.h b/main/hudlog.h index a06ea8c21..87392e755 100755 --- a/main/hudlog.h +++ b/main/hudlog.h @@ -7,7 +7,6 @@ void kmatrix_log(int fhudonly); void hud_log_setdir(char *dir); void hud_log_message(char * message); -extern int HUD_log_messages; extern int HUD_log_multi_autostart; extern int HUD_log_autostart; diff --git a/main/inferno.c b/main/inferno.c index 16db35ea1..5c2df0927 100755 --- a/main/inferno.c +++ b/main/inferno.c @@ -295,7 +295,6 @@ void show_cmdline_help() { printf( " -menu_gameres %s\n", "Set menus to use the same resolution as in game"); printf( " -hudlog_multi %s\n", "Start hudlog upon entering multiplayer games"); printf( " -hudlogdir %s\n", "Log hud messages in directory "); - printf( " -hudlogstdout %s\n", "Log hud messages to stdout"); printf( " -hudlines %s\n", "Number of hud messages to show"); printf( " -msgcolorlevel %s\n", "Level of colorization for hud messages (0-3)"); printf( " -nocdaudio %s\n", "Disable cd audio"); @@ -444,9 +443,6 @@ int main(int argc,char **argv) if (FindArg("-hudlog_multi")) HUD_log_multi_autostart = 1; - if (FindArg("-hudlogstdout")) - HUD_log_messages = 1; - if ((t=FindArg("-hudlogdir"))) hud_log_setdir(Args[t+1]);