From dd74536bef66a4e1d214caab38805d0c70acb075 Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 3 Oct 2011 17:23:41 +0000 Subject: (svn r22981) -Add: GroupStatistics for the ALL_GROUP. --- src/ai/api/ai_engine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ai/api') diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp index 564c77b6b..904b7fe33 100644 --- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -24,8 +24,7 @@ /* static */ bool AIEngine::IsValidEngine(EngineID engine_id) { const Engine *e = ::Engine::GetIfValid(engine_id); - return e != NULL && (::IsEngineBuildable(engine_id, e->type, _current_company) || ::Company::Get(_current_company)->num_engines[engine_id] > 0); - + return e != NULL && (::IsEngineBuildable(engine_id, e->type, _current_company) || ::Company::Get(_current_company)->group_all[e->type].num_engines[engine_id] > 0); } /* static */ bool AIEngine::IsBuildable(EngineID engine_id) -- cgit v1.2.3-70-g09d2