Mercurial > hg > openttd
changeset 11061:a6d63fcd0fd9 draft
(svn r15401) -Fix [FS#2619](r15027): AI::Stop changed _current_company, but didn't restore its original value
author | smatz <smatz@openttd.org> |
---|---|
date | Sat, 07 Feb 2009 17:01:44 +0000 |
parents | d85c5180effe |
children | 41935eabf53f |
files | src/ai/ai_core.cpp |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -88,12 +88,15 @@ { if (_networking && !_network_server) return; + CompanyID old_company = _current_company; _current_company = company; Company *c = GetCompany(company); delete c->ai_instance; c->ai_instance = NULL; + _current_company = old_company; + InvalidateWindowData(WC_AI_DEBUG, 0, -1); }