summaryrefslogtreecommitdiff
path: root/src/network/network.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-19 23:32:39 +0000
committerrubidium <rubidium@openttd.org>2009-03-19 23:32:39 +0000
commitf524d3996385d089e619fa28d4719506db062e26 (patch)
tree682f409d8eb42ee59e0828725b781244a3ff54d7 /src/network/network.cpp
parent73e1f389347c728fec53f18ae95bdf881d0b931d (diff)
downloadopenttd-f524d3996385d089e619fa28d4719506db062e26.tar.xz
(svn r15773) -Fix [FS#2475]: number of active clients wasn't always properly
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r--src/network/network.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index f6d4caf50..7f0279eac 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -346,7 +346,7 @@ static uint NetworkCountActiveClients()
static bool _min_active_clients_paused = false;
/* Check if the minimum number of active clients has been reached and pause or unpause the game as appropriate */
-void CheckMinActiveClients()
+static void CheckMinActiveClients()
{
if (!_network_dedicated) return;
@@ -466,8 +466,6 @@ void NetworkCloseClient(NetworkClientSocket *cs)
delete cs->GetInfo();
delete cs;
-
- CheckMinActiveClients();
}
/* For the server, to accept new clients */
@@ -820,7 +818,6 @@ bool NetworkServerStart()
if (_network_dedicated) IConsoleCmdExec("exec scripts/on_dedicated.scr 0");
_min_active_clients_paused = false;
- CheckMinActiveClients();
/* Try to register us to the master server */
_network_last_advertise_frame = 0;
@@ -1028,6 +1025,7 @@ void NetworkGameLoop()
cp->company = (CompanyID)company;
}
#endif /* DEBUG_DUMP_COMMANDS */
+ CheckMinActiveClients();
bool send_frame = false;