summaryrefslogtreecommitdiff
path: root/src/network/network.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-30 17:22:56 +0000
committerrubidium <rubidium@openttd.org>2007-01-30 17:22:56 +0000
commit86b046864a8672dabb7bebc2c1d9fb60e9b53ea5 (patch)
treecc2fcbaaf61a17dfad0f7bc6d11bc5b8312028fb /src/network/network.cpp
parentbe19961f1ebbc7e97aee8dcfa757d828a90c470c (diff)
downloadopenttd-86b046864a8672dabb7bebc2c1d9fb60e9b53ea5.tar.xz
(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.
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r--src/network/network.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 4ab8d3390..a181f9055 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -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,