summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-10-03 17:23:41 +0000
committerfrosch <frosch@openttd.org>2011-10-03 17:23:41 +0000
commitdd74536bef66a4e1d214caab38805d0c70acb075 (patch)
treeb63a5d705ca0f724802d0cc2363c99f52a1de70a /src/ai
parent5be8f732049daa97fd212ed9b91354d3b146d99d (diff)
downloadopenttd-dd74536bef66a4e1d214caab38805d0c70acb075.tar.xz
(svn r22981) -Add: GroupStatistics for the ALL_GROUP.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_engine.cpp3
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)