diff options
author | yexo <yexo@openttd.org> | 2010-04-02 17:35:20 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-04-02 17:35:20 +0000 |
commit | 81657379392e34031d91496d7fba5e235c248501 (patch) | |
tree | aa2b40f829513b5dde971fb3f5819a117d70ed9a /src/ai/ai_core.cpp | |
parent | 1cab5539943e14a57497db6519f5eef4187f4ea0 (diff) | |
download | openttd-81657379392e34031d91496d7fba5e235c248501.tar.xz |
(svn r19544) -Feature [FS#3496]: add an input box to the AI Debug window where you can input a break string (patch by Zuu)
Diffstat (limited to 'src/ai/ai_core.cpp')
-rw-r--r-- | src/ai/ai_core.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index fcba313a3..02868e9bd 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -108,6 +108,17 @@ DeleteWindowById(WC_AI_SETTINGS, company); } +/* static */ void AI::Suspend(CompanyID company) +{ + if (_networking && !_network_server) return; + + CompanyID old_company = _current_company; + _current_company = company; + Company::Get(company)->ai_instance->Suspend(); + + _current_company = old_company; +} + /* static */ void AI::KillAll() { /* It might happen there are no companies .. than we have nothing to loop */ |