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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user