summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 82c34f3e1..31e9bcef0 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -472,11 +472,14 @@ void StartupCompanies()
static void MaybeStartNewCompany()
{
- uint n;
+#ifdef ENABLE_NETWORK
+ if (_networking && ActiveCompanyCount() >= _settings_client.network.max_companies) return;
+#endif /* ENABLE_NETWORK */
+
Company *c;
/* count number of competitors */
- n = 0;
+ uint n = 0;
FOR_ALL_COMPANIES(c) {
if (c->is_ai) n++;
}