From 15cd754da09d55a94f12ee17b39df3db7651c565 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 5 Apr 2008 07:34:06 +0000 Subject: [PATCH] motd tweaks --- src/game/client/gc_client.cpp | 4 +++- src/game/client/gc_hooks.cpp | 6 ++---- src/game/g_variables.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index 6bc83af9c..bcacfd17e 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -896,7 +896,9 @@ void render_game() if(inp_key_down(KEY_ESC)) { - if (chat_mode) + if(server_motd_time) + server_motd_time = 0; + else if (chat_mode) chat_mode = CHATMODE_NONE; else { diff --git a/src/game/client/gc_hooks.cpp b/src/game/client/gc_hooks.cpp index 4a0a0ecc9..33b9ba91a 100644 --- a/src/game/client/gc_hooks.cpp +++ b/src/game/client/gc_hooks.cpp @@ -542,10 +542,8 @@ extern "C" void modc_message(int msgtype) } } - dbg_msg("game", "MOTD: %s", server_motd); - - if(server_motd[0]) - server_motd_time = time_get()+time_freq()*10; + if(server_motd[0] && config.cl_motd_time) + server_motd_time = time_get()+time_freq()*config.cl_motd_time; else server_motd_time = 0; } diff --git a/src/game/g_variables.h b/src/game/g_variables.h index 02ad4fbc6..fb69584ee 100644 --- a/src/game/g_variables.h +++ b/src/game/g_variables.h @@ -22,6 +22,7 @@ MACRO_CONFIG_INT(ed_showkeys, 0, 0, 1) MACRO_CONFIG_INT(cl_flow, 0, 0, 1) MACRO_CONFIG_INT(cl_show_welcome, 1, 0, 1) +MACRO_CONFIG_INT(cl_motd_time, 10, 0, 100) MACRO_CONFIG_INT(player_use_custom_color, 0, 0, 1) MACRO_CONFIG_INT(player_color_body, 65408, 0, 0)