Output a log, savegame and screenshot on desync events
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "network_client.h"
|
||||
#include "../core/backup_type.hpp"
|
||||
#include "../thread.h"
|
||||
#include "../crashlog.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -282,6 +283,8 @@ void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus res)
|
||||
DEBUG(net, 0, "Sync error detected!");
|
||||
my_client->ClientError(NETWORK_RECV_STATUS_DESYNC);
|
||||
|
||||
CrashLog::DesyncCrashLog();
|
||||
|
||||
extern void CheckCaches(bool force_check);
|
||||
CheckCaches(true);
|
||||
return false;
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "../core/pool_func.hpp"
|
||||
#include "../core/random_func.hpp"
|
||||
#include "../rev.h"
|
||||
#include "../crashlog.h"
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#if defined(__MINGW32__)
|
||||
@@ -1170,6 +1171,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_ERROR(Packet *p
|
||||
NetworkAdminClientError(this->client_id, errorno);
|
||||
|
||||
if (errorno == NETWORK_ERROR_DESYNC) {
|
||||
CrashLog::DesyncCrashLog();
|
||||
|
||||
// have the server and all clients run some sanity checks
|
||||
NetworkSendCommand(0, 0, 0, CMD_DESYNC_CHECK, nullptr, nullptr, _local_company, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user