1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 21:19:10 +00:00

(svn r10462) -Add: a command dumper/loader that could be enabled compile-time and server side only to aid debugging some desyncs, i.e. dump the stream of commands so it could be replayed in exactly the same way later. This should primarily be used to make desyncs more easily reproducable, so it can be properly debugged.

This commit is contained in:
rubidium
2007-07-07 10:06:10 +00:00
parent 9a55c79fd1
commit 3b52a6bfc4
5 changed files with 80 additions and 0 deletions

View File

@@ -1677,6 +1677,9 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode, Subdirectory sb)
}
} else { /* LOAD game */
assert(mode == SL_LOAD);
#ifdef DEBUG_DUMP_COMMANDS
debug_dump_commands("ddc:load:%s\n", filename);
#endif /* DUMP_COMMANDS */
if (fread(hdr, sizeof(hdr), 1, _sl.fh) != 1) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_READABLE);