diff options
Diffstat (limited to 'src/ai/api/ai_industry.cpp')
-rw-r--r-- | src/ai/api/ai_industry.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ai/api/ai_industry.cpp b/src/ai/api/ai_industry.cpp index 9a09d5ecd..068a92865 100644 --- a/src/ai/api/ai_industry.cpp +++ b/src/ai/api/ai_industry.cpp @@ -123,7 +123,9 @@ if (!IsValidIndustry(industry_id)) return -1; Industry *ind = ::GetIndustry(industry_id); - return (int32)::FindStationsAroundTiles(ind->xy, ind->width, ind->height).Length(); + StationList stations; + ::FindStationsAroundTiles(ind->xy, ind->width, ind->height, &stations); + return (int32)stations.Length(); } /* static */ int32 AIIndustry::GetDistanceManhattanToTile(IndustryID industry_id, TileIndex tile) |