diff options
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_engine.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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) |