about summary refs log tree commit diff
path: root/src/game/client/components/chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/chat.cpp')
-rw-r--r--src/game/client/components/chat.cpp13
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)