summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;