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.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 06baa2aef..5e7d4ed41 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -507,6 +507,7 @@ void StartupCompanies()
_next_competitor_start = 0;
}
+#ifdef ENABLE_AI
static void MaybeStartNewCompany()
{
#ifdef ENABLE_NETWORK
@@ -527,6 +528,7 @@ static void MaybeStartNewCompany()
DoCommandP(0, 1, INVALID_COMPANY, CMD_COMPANY_CTRL);
}
}
+#endif /* ENABLE_AI */
void InitializeCompanies()
{
@@ -608,6 +610,7 @@ void OnTick_Companies()
if (c->bankrupt_asked != 0) HandleBankruptcyTakeover(c);
}
+#ifdef ENABLE_AI
if (_next_competitor_start == 0) {
_next_competitor_start = AI::GetStartNextTime() * DAY_TICKS;
}
@@ -615,6 +618,7 @@ void OnTick_Companies()
if (AI::CanStartNew() && _game_mode != GM_MENU && --_next_competitor_start == 0) {
MaybeStartNewCompany();
}
+#endif /* ENABLE_AI */
_cur_company_tick_index = (_cur_company_tick_index + 1) % MAX_COMPANIES;
}