(svn r8461) -Feature: check for NewGRF compatability before actually downloading the map from a game server when connecting from the command prompt and internal console.

This commit is contained in:
rubidium
2007-01-30 17:22:56 +00:00
parent be19961f1e
commit 86b046864a
7 changed files with 106 additions and 15 deletions

View File

@@ -250,9 +250,10 @@ static void NetworkClientError(NetworkRecvStatus res, NetworkTCPSocketHandler* c
}
switch (res) {
case NETWORK_RECV_STATUS_DESYNC: errorno = NETWORK_ERROR_DESYNC; break;
case NETWORK_RECV_STATUS_SAVEGAME: errorno = NETWORK_ERROR_SAVEGAME_FAILED; break;
default: errorno = NETWORK_ERROR_GENERAL; break;
case NETWORK_RECV_STATUS_DESYNC: errorno = NETWORK_ERROR_DESYNC; break;
case NETWORK_RECV_STATUS_SAVEGAME: errorno = NETWORK_ERROR_SAVEGAME_FAILED; break;
case NETWORK_RECV_STATUS_NEWGRF_MISMATCH: errorno = NETWORK_ERROR_NEWGRF_MISMATCH; break;
default: errorno = NETWORK_ERROR_GENERAL; break;
}
// This means we fucked up and the server closed the connection
if (res != NETWORK_RECV_STATUS_SERVER_ERROR && res != NETWORK_RECV_STATUS_SERVER_FULL &&
@@ -282,6 +283,7 @@ char* GetNetworkErrorMsg(char* buf, NetworkErrorCode err, const char* last)
STR_NETWORK_ERR_CLIENT_SAVEGAME,
STR_NETWORK_ERR_CLIENT_CONNECTION_LOST,
STR_NETWORK_ERR_CLIENT_PROTOCOL_ERROR,
STR_NETWORK_ERR_CLIENT_NEWGRF_MISMATCH,
STR_NETWORK_ERR_CLIENT_NOT_AUTHORIZED,
STR_NETWORK_ERR_CLIENT_NOT_EXPECTED,
STR_NETWORK_ERR_CLIENT_WRONG_REVISION,