Changeset - r15046:72123251c325
[Not reviewed]
master
0 2 0
rubidium - 14 years ago 2010-04-19 19:50:56
rubidium@openttd.org
(svn r19678) -Fix (r19607): client status was shown incorrect in the console
2 files changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/network/core/tcp_game.h
Show inline comments
 
@@ -82,12 +82,13 @@ enum ClientStatus {
 
	STATUS_AUTHORIZED,   ///< The client is authorized
 
	STATUS_MAP_WAIT,     ///< The client is waiting as someone else is downloading the map
 
	STATUS_MAP,          ///< The client is downloading the map
 
	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;
 
typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS> NetworkClientSocketPool;
 
extern NetworkClientSocketPool _networkclientsocket_pool;
 

	
src/network/network_server.cpp
Show inline comments
 
@@ -1700,20 +1700,22 @@ const char *GetClientIP(NetworkClientInf
 
}
 

	
 
void NetworkServerShowStatusToConsole()
 
{
 
	static const char * const stat_str[] = {
 
		"inactive",
 
		"authorizing",
 
		"authorizing (server password)",
 
		"authorizing (company password)",
 
		"authorized",
 
		"waiting",
 
		"loading map",
 
		"map done",
 
		"ready",
 
		"active"
 
	};
 
	assert_compile(lengthof(stat_str) == STATUS_END);
 

	
 
	NetworkClientSocket *cs;
 
	FOR_ALL_CLIENT_SOCKETS(cs) {
 
		int lag = NetworkCalculateLag(cs);
 
		NetworkClientInfo *ci = cs->GetInfo();
 
		const char *status;
0 comments (0 inline, 0 general)