diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-05-31 09:44:20 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-05-31 09:44:20 +0000 |
| commit | 4bb1df318905f491740f4298c69cda317fb53fcb (patch) | |
| tree | 486c4edf2d6af2089ffab60a7422d5e7abefa891 /src/game/client/components/chat.cpp | |
| parent | b28ede2da2c42643c5aa710a8076f0249d48c9e4 (diff) | |
| download | zcatch-4bb1df318905f491740f4298c69cda317fb53fcb.tar.gz zcatch-4bb1df318905f491740f4298c69cda317fb53fcb.zip | |
moved 0.5 branch to trunk
Diffstat (limited to 'src/game/client/components/chat.cpp')
| -rw-r--r-- | src/game/client/components/chat.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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) |