summaryrefslogtreecommitdiff
path: root/src/network/network.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-07 10:06:10 +0000
committerrubidium <rubidium@openttd.org>2007-07-07 10:06:10 +0000
commit3b52a6bfc47a496b13cc4bd59a509109bb078785 (patch)
tree294bf7c6be70bd0b4c892e7c43b2cd076eabfd2a /src/network/network.h
parent9a55c79fd11e9075b937abe0a6a077fa77a72823 (diff)
downloadopenttd-3b52a6bfc47a496b13cc4bd59a509109bb078785.tar.xz
(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.
Diffstat (limited to 'src/network/network.h')
-rw-r--r--src/network/network.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/network/network.h b/src/network/network.h
index c20e9b3f8..9907716ac 100644
--- a/src/network/network.h
+++ b/src/network/network.h
@@ -20,6 +20,17 @@
// nothing will happen.
//#define ENABLE_NETWORK_SYNC_EVERY_FRAME
+/*
+ * Dumps all commands that are sent/received to stderr and saves every month.
+ * This log can become quite large over time; say in the order of two to three
+ * times the bandwidth used for network games.
+ */
+//#define DEBUG_DUMP_COMMANDS
+
+#ifdef DEBUG_DUMP_COMMANDS
+void CDECL debug_dump_commands(const char *s, ...);
+#endif /* DEBUG_DUMP_COMMANDS */
+
// In theory sending 1 of the 2 seeds is enough to check for desyncs
// so in theory, this next define can be left off.
//#define NETWORK_SEND_DOUBLE_SEED