summaryrefslogtreecommitdiff
path: root/src/network/network_client.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-24 20:51:12 +0000
committerrubidium <rubidium@openttd.org>2010-10-24 20:51:12 +0000
commit8f9dcab09b4030a77b96e534530d83226e526b24 (patch)
treebfa536e2bb020b7fc711f1127d4576ed0cd367e9 /src/network/network_client.h
parent4ea67eff8b1c92542ff8bc1b3e04297905d9e3c5 (diff)
downloadopenttd-8f9dcab09b4030a77b96e534530d83226e526b24.tar.xz
(svn r21033) -Codechange: be more strict with the packets a client accepts at a given moment
Diffstat (limited to 'src/network/network_client.h')
-rw-r--r--src/network/network_client.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/network/network_client.h b/src/network/network_client.h
index 90e37d278..f47fe0b65 100644
--- a/src/network/network_client.h
+++ b/src/network/network_client.h
@@ -21,6 +21,23 @@ class ClientNetworkGameSocketHandler : public ZeroedMemoryAllocator, public Netw
private:
FILE *download_file; ///< Handle used for downloading the savegame.
+ /** Status of the connection with the server. */
+ enum ServerStatus {
+ STATUS_INACTIVE, ///< The client is not connected nor active.
+ STATUS_COMPANY_INFO, ///< We are trying to get company information.
+ STATUS_JOIN, ///< We are trying to join a server.
+ STATUS_NEWGRFS_CHECK, ///< Last action was checking NewGRFs.
+ STATUS_AUTH_GAME, ///< Last action was requesting game (server) password.
+ STATUS_AUTH_COMPANY, ///< Last action was requestion company password.
+ STATUS_AUTHORIZED, ///< The client is authorized at the server.
+ STATUS_MAP_WAIT, ///< The client is waiting as someone else is downloading the map.
+ STATUS_MAP, ///< The client is downloading the map.
+ STATUS_ACTIVE, ///< The client is active within in the game.
+ STATUS_END ///< Must ALWAYS be on the end of this list!! (period)
+ };
+
+ ServerStatus status; ///< Status of the connection with the server.
+
protected:
friend void NetworkExecuteLocalCommandQueue();
friend void NetworkClose(bool close_admins);