From e852bf154f2af40b3cee1f67bef41a78c2056de5 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 5 Jun 2010 13:29:48 +0000 Subject: (svn r19932) -Codechange: Preserve _current_company when starting AIs. --- src/ai/ai_core.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 8d333877f..ab950ef06 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -48,13 +48,15 @@ config->ChangeAI(info->GetName(), -1, false, true); } - _current_company = company; + Backup cur_company(_current_company, company, FILE_LINE); Company *c = Company::Get(company); c->ai_info = info; assert(c->ai_instance == NULL); c->ai_instance = new AIInstance(info); + cur_company.Restore(); + InvalidateWindowData(WC_AI_DEBUG, 0, -1); return; } -- cgit v1.2.3-70-g09d2