From 4bb1df318905f491740f4298c69cda317fb53fcb Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 31 May 2009 09:44:20 +0000 Subject: moved 0.5 branch to trunk --- src/game/client/components/chat.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/game/client/components/chat.cpp') diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index 01b9f457..8ef4e17d 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -10,12 +10,15 @@ #include "chat.hpp" -void CHAT::on_reset() +void CHAT::on_statechange(int new_state, int old_state) { - mode = MODE_NONE; - for(int i = 0; i < MAX_LINES; i++) - lines[i].time = -1000000; - current_line = 0; + if(old_state <= CLIENTSTATE_CONNECTING) + { + mode = MODE_NONE; + for(int i = 0; i < MAX_LINES; i++) + lines[i].time = 0; + current_line = 0; + } } void CHAT::con_say(void *result, void *user_data) -- cgit 1.4.1