From cfcd1e39f964dd7f39e0bf12c818cbada210b65d Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sun, 14 Jan 2007 01:55:59 +0000 Subject: [PATCH] moved hudlog printf's so they do not spam stdout with redundant messages --- dxx-changelog.txt | 4 ++++ main/hud.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dxx-changelog.txt b/dxx-changelog.txt index 698a1c756..2de3a3884 100755 --- a/dxx-changelog.txt +++ b/dxx-changelog.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20070114 +-------- +main/hud.c: moved hudlog printf's so they do not spam stdout with redundant messages + 20070113 -------- main/object.c: removing the !dead statement (leftover from WraithX Deathcam) from object_move_one() so the function will return correctly if player dies instead running further and creating invalid code and crashes diff --git a/main/hud.c b/main/hud.c index fb4908ae7..c2f6e59cf 100755 --- a/main/hud.c +++ b/main/hud.c @@ -273,19 +273,6 @@ int HUD_init_message_va(char * format, va_list args) message = &HUD_messages[hud_last][0]; vsprintf(message,format,args); - t=time(NULL); - lt=localtime(&t); - - /* Produce a colorised version and send it to the console */ - printf("%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec); - if (HUD_color == -1) - HUD_color = BM_XRGB(0,28,0); - con_message[0] = CC_COLOR; - con_message[1] = HUD_color; - con_message[2] = '\0'; - strcat(con_message, message); - con_printf(CON_NORMAL, "%s\n", con_message); - // Added by Leighton if ((Game_mode & GM_MULTI) && FindArg("-noredundancy")) @@ -315,6 +302,19 @@ int HUD_init_message_va(char * format, va_list args) return 0; // ignore since it is the same as the last one } + t=time(NULL); + lt=localtime(&t); + + /* Produce a colorised version and send it to the console */ + printf("%02i:%02i:%02i ",lt->tm_hour,lt->tm_min,lt->tm_sec); + if (HUD_color == -1) + HUD_color = BM_XRGB(0,28,0); + con_message[0] = CC_COLOR; + con_message[1] = HUD_color; + con_message[2] = '\0'; + strcat(con_message, message); + con_printf(CON_NORMAL, "%s\n", con_message); + hud_last = temp; // Check if memory has been overwritten at this point. if (strlen(message) >= HUD_MESSAGE_LENGTH)