summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-01-17 21:12:19 +0000
committerrubidium <rubidium@openttd.org>2012-01-17 21:12:19 +0000
commitede8c86f778583e9dc5b1cb20aaa450eff0e6c6c (patch)
treecae587602a0024491ced56cdf130da7ac0d59957 /src/network
parent8a1ac5a12857e68f8a2a49f5ff6a9ed1fd748740 (diff)
downloadopenttd-ede8c86f778583e9dc5b1cb20aaa450eff0e6c6c.tar.xz
(svn r23821) -Fix-ish: when replaying a command log, ignore the command limit
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_command.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp
index c5ec83e28..ef8a33804 100644
--- a/src/network/network_command.cpp
+++ b/src/network/network_command.cpp
@@ -262,7 +262,12 @@ static void DistributeCommandPacket(CommandPacket cp, const NetworkClientSocket
*/
static void DistributeQueue(CommandQueue *queue, const NetworkClientSocket *owner)
{
+#ifdef DEBUG_DUMP_COMMANDS
+ /* When replaying we do not want this limitation. */
+ int to_go = MAX_UINT16;
+#else
int to_go = _settings_client.network.commands_per_frame;
+#endif
CommandPacket *cp;
while (--to_go >= 0 && (cp = queue->Pop(true)) != NULL) {