summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-05-13 08:59:50 +0000
committerrubidium <rubidium@openttd.org>2010-05-13 08:59:50 +0000
commit6fa962b867a4983d67bc8acd2c8a3ed5c7ce3dc3 (patch)
treefd4a517eb5f4cb346acaa6d880ebd133163ed8be
parent3118292b1461fb573964008da745326d53d246ab (diff)
downloadopenttd-6fa962b867a4983d67bc8acd2c8a3ed5c7ce3dc3.tar.xz
(svn r19808) -Codechange: NetworkCalculateLag returned an uint, so keep it that way
-rw-r--r--src/network/network_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index e4d3554ad..93f5d06c3 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1641,7 +1641,7 @@ void NetworkServer_Tick(bool send_frame)
/* Check if the speed of the client is what we can expect from a client */
if (cs->status == STATUS_ACTIVE) {
/* 1 lag-point per day */
- int lag = NetworkCalculateLag(cs) / DAY_TICKS;
+ uint lag = NetworkCalculateLag(cs) / DAY_TICKS;
if (lag > 0) {
if (lag > 3) {
/* Client did still not report in after 4 game-day, drop him
@@ -1660,13 +1660,13 @@ void NetworkServer_Tick(bool send_frame)
cs->lag_test = 0;
}
} else if (cs->status == STATUS_PRE_ACTIVE) {
- int lag = NetworkCalculateLag(cs);
+ uint lag = NetworkCalculateLag(cs);
if (lag > _settings_client.network.max_join_time) {
IConsolePrintF(CC_ERROR,"Client #%d is dropped because it took longer than %d ticks for him to join", cs->client_id, _settings_client.network.max_join_time);
NetworkCloseClient(cs, NETWORK_RECV_STATUS_SERVER_ERROR);
}
} else if (cs->status == STATUS_INACTIVE) {
- int lag = NetworkCalculateLag(cs);
+ uint lag = NetworkCalculateLag(cs);
if (lag > 4 * DAY_TICKS) {
IConsolePrintF(CC_ERROR,"Client #%d is dropped because it took longer than %d ticks to start the joining process", cs->client_id, 4 * DAY_TICKS);
NetworkCloseClient(cs, NETWORK_RECV_STATUS_SERVER_ERROR);
@@ -1724,7 +1724,7 @@ void NetworkServerShowStatusToConsole()
NetworkClientSocket *cs;
FOR_ALL_CLIENT_SOCKETS(cs) {
- int lag = NetworkCalculateLag(cs);
+ uint lag = NetworkCalculateLag(cs);
NetworkClientInfo *ci = cs->GetInfo();
const char *status;