(svn r23476) -Codechange: use the error queue to replace switch mode error strings, again making it possible to return multiple errors

This commit is contained in:
rubidium
2011-12-10 15:16:58 +00:00
parent 420d358fef
commit 2bf0fc3c5c
9 changed files with 58 additions and 42 deletions

View File

@@ -18,6 +18,7 @@
#include "../network.h"
#include "../network_internal.h"
#include "../../debug.h"
#include "../../error.h"
#include "table/strings.h"
@@ -46,8 +47,7 @@ NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error)
if (!_network_server && _networking) {
_switch_mode = SM_MENU;
_networking = false;
extern StringID _switch_mode_errorstr;
_switch_mode_errorstr = STR_NETWORK_ERROR_LOSTCONNECTION;
ShowErrorMessage(STR_NETWORK_ERROR_LOSTCONNECTION, INVALID_STRING_ID, WL_CRITICAL);
return NETWORK_RECV_STATUS_CONN_LOST;
}