(svn r23780) -Fix [FS#4963] (r23764): also name the two new errors server-side. As extra, split up one of the errors in 3 errors, to be more specific what goes wrong. As cherry on top, make sure on all sides we can never again forget to add such entries on both sides, by introducing an assert_compile()

This commit is contained in:
truebrain
2012-01-09 21:22:48 +00:00
parent 64605a253e
commit 6c7c02eb14
5 changed files with 46 additions and 37 deletions

View File

@@ -1843,7 +1843,7 @@ void NetworkServer_Tick(bool send_frame)
/* Downloading the map... this is the amount of time since starting the saving. */
if (lag > _settings_client.network.max_download_time) {
IConsolePrintF(CC_ERROR, "Client #%d is dropped because it took longer than %d ticks to download the map", cs->client_id, _settings_client.network.max_download_time);
cs->SendError(NETWORK_ERROR_TIMEOUT_COMPUTER);
cs->SendError(NETWORK_ERROR_TIMEOUT_MAP);
continue;
}
break;
@@ -1853,7 +1853,7 @@ void NetworkServer_Tick(bool send_frame)
/* The map has been sent, so this is for loading the map and syncing up. */
if (lag > _settings_client.network.max_join_time) {
IConsolePrintF(CC_ERROR, "Client #%d is dropped because it took longer than %d ticks to join", cs->client_id, _settings_client.network.max_join_time);
cs->SendError(NETWORK_ERROR_TIMEOUT_COMPUTER);
cs->SendError(NETWORK_ERROR_TIMEOUT_JOIN);
continue;
}
break;