diff options
author | rubidium <rubidium@openttd.org> | 2010-10-15 20:29:59 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-10-15 20:29:59 +0000 |
commit | c9cbab14ea4ad07354524dd1a7e7df4126722ba1 (patch) | |
tree | 995cd1a20ccc1519ad92a518ac439ca63a19fc01 /src | |
parent | f712055002526b48b8f7f6c79c600f73784d6ce3 (diff) | |
download | openttd-c9cbab14ea4ad07354524dd1a7e7df4126722ba1.tar.xz |
(svn r20937) -Codechange: move some variables from client/server to server only
Diffstat (limited to 'src')
-rw-r--r-- | src/network/core/tcp_game.cpp | 1 | ||||
-rw-r--r-- | src/network/core/tcp_game.h | 11 | ||||
-rw-r--r-- | src/network/network_server.cpp | 1 | ||||
-rw-r--r-- | src/network/network_server.h | 5 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 0960f4324..dc3be15fe 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -27,7 +27,6 @@ */ NetworkGameSocketHandler::NetworkGameSocketHandler(SOCKET s) { - this->status = STATUS_INACTIVE; this->sock = s; this->last_frame = _frame_counter; this->last_frame_server = _frame_counter; diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index 71537179b..2a24b938c 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -163,15 +163,10 @@ protected: NetworkGameSocketHandler(SOCKET s); public: - ClientID client_id; ///< Client identifier - uint32 last_frame; ///< Last frame we have executed - uint32 last_frame_server; ///< Last frame the server has executed - byte lag_test; ///< Byte used for lag-testing the client - - ClientStatus status; ///< Status of this client - + ClientID client_id; ///< Client identifier + uint32 last_frame; ///< Last frame we have executed + uint32 last_frame_server; ///< Last frame the server has executed CommandQueue incoming_queue; ///< The command-queue awaiting handling - CommandQueue outgoing_queue; ///< The command-queue awaiting delivery NetworkRecvStatus CloseConnection(bool error = true); virtual NetworkRecvStatus CloseConnection(NetworkRecvStatus status) = 0; diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 01232c0a4..ccb1bb37e 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -55,6 +55,7 @@ INSTANTIATE_POOL_METHODS(NetworkClientSocket) */ ServerNetworkGameSocketHandler::ServerNetworkGameSocketHandler(SOCKET s) : NetworkGameSocketHandler(s) { + this->status = STATUS_INACTIVE; this->client_id = _network_client_id++; NetworkClientInfo *ci = new NetworkClientInfo(this->client_id); this->SetInfo(ci); diff --git a/src/network/network_server.h b/src/network/network_server.h index b287e92d5..691411519 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -47,7 +47,12 @@ protected: NetworkRecvStatus SendWait(); NetworkRecvStatus SendNeedGamePassword(); NetworkRecvStatus SendNeedCompanyPassword(); + public: + byte lag_test; ///< Byte used for lag-testing the client + ClientStatus status; ///< Status of this client + CommandQueue outgoing_queue; ///< The command-queue awaiting delivery + ServerNetworkGameSocketHandler(SOCKET s); ~ServerNetworkGameSocketHandler(); |