changeset 15056:deb456565c98 draft

(svn r19678) -Fix (r19607): client status was shown incorrect in the console
author rubidium <rubidium@openttd.org>
date Mon, 19 Apr 2010 19:50:56 +0000
parents b44e510a2774
children e2d2c0738c6b
files src/network/core/tcp_game.h src/network/network_server.cpp
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/network/core/tcp_game.h
+++ b/src/network/core/tcp_game.h
@@ -85,6 +85,7 @@
 	STATUS_DONE_MAP,     ///< The client has downloaded the map
 	STATUS_PRE_ACTIVE,   ///< The client is catching up the delayed frames
 	STATUS_ACTIVE,       ///< The client is active within in the game
+	STATUS_END           ///< Must ALWAYS be on the end of this list!! (period)
 };
 
 class NetworkClientSocket;
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1703,7 +1703,8 @@
 {
 	static const char * const stat_str[] = {
 		"inactive",
-		"authorizing",
+		"authorizing (server password)",
+		"authorizing (company password)",
 		"authorized",
 		"waiting",
 		"loading map",
@@ -1711,6 +1712,7 @@
 		"ready",
 		"active"
 	};
+	assert_compile(lengthof(stat_str) == STATUS_END);
 
 	NetworkClientSocket *cs;
 	FOR_ALL_CLIENT_SOCKETS(cs) {