From b43a794e80d0bda0fb114cfd19a190ce149d995c Mon Sep 17 00:00:00 2001 From: FruitieX Date: Sun, 13 Jun 2010 13:49:55 +0300 Subject: [PATCH] fake the chat messages with drawcolorcodedstring() when in hud_configure mode so we dont have to spam the console (and can see the chat text if the menu is up) --- qcsrc/client/hud.qc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index c507a936e..5bb8307d6 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3834,7 +3834,6 @@ void HUD_DrawPressedKeys(void) // Handle chat as a panel (#12) // -float chat_prevtime; void HUD_Chat(void) { float id = HUD_PANEL_CHAT; @@ -3861,17 +3860,11 @@ void HUD_Chat(void) if(hud_configure) { - if(chat_prevtime != floor(time/5)) + cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such + float i; + for(i = 0; i < cvar("con_chat"); ++i) { - chat_prevtime = floor(time/5); - - float sound_prev; - sound_prev = cvar("con_chatsound"); - - // disable chat bleep - cvar_set("con_chatsound", "0"); - print("\x01Player^7: This is the chat area\n"); - cvar_set("con_chatsound", ftos(sound_prev)); + drawcolorcodedstring(pos + eY * i * cvar("con_chatsize"), "^3Player^7: This is the chat area.", '1 1 0' * cvar("con_chatsize"), HUD_Panel_GetFgAlpha(id), DRAWFLAG_NORMAL); } } } -- 2.39.2