diff options
author | rubidium <rubidium@openttd.org> | 2010-02-10 16:24:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-10 16:24:05 +0000 |
commit | 21bd2722cd89995370523385c213da32c8d47100 (patch) | |
tree | e7f3bb43657b1f8a59f89899dfc582d480bedad0 /src/company_cmd.cpp | |
parent | 78ce2858fc2704a5aafbc0b76cdb636338122f63 (diff) | |
download | openttd-21bd2722cd89995370523385c213da32c8d47100.tar.xz |
(svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r-- | src/company_cmd.cpp | 4 |
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; } |