diff options
author | rubidium <rubidium@openttd.org> | 2009-09-30 13:32:39 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-30 13:32:39 +0000 |
commit | 124e543b1d7c100cd86213b9079df58834dd3d1e (patch) | |
tree | 8b1651a3618fab52dad0dba7bb5571eccd8e89c9 /src/network | |
parent | d3cfacdbf0ba4f3b5a6e1fb4906d724ae3bb02c3 (diff) | |
download | openttd-124e543b1d7c100cd86213b9079df58834dd3d1e.tar.xz |
(svn r17667) -Fix [FS#3245]: autopause tried to (un)pause the server every tick when the pause command only gets processed once every frame_freq ticks. So it would spam the console with duplicate attempts.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 5622be20c..4990237a3 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1019,7 +1019,12 @@ void NetworkGameLoop() cp->company = (CompanyID)company; } #endif /* DEBUG_DUMP_COMMANDS */ - CheckMinActiveClients(); + if (_frame_counter >= _frame_counter_max) { + /* Only check for active clients just before we're going to send out + * the commands so we don't send multiple pause/unpause commands when + * the frame_freq is more than 1 tick. */ + CheckMinActiveClients(); + } bool send_frame = false; |