summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-06-07 13:29:09 +0000
committeryexo <yexo@openttd.org>2009-06-07 13:29:09 +0000
commit726ba5086887306ca20561fee968be7777c282ce (patch)
tree0f0121baa7f53bebc4809a6b3e2803b0ee219f1b /src
parent8745a309718b5241893c02425e01172212482dc6 (diff)
downloadopenttd-726ba5086887306ca20561fee968be7777c282ce.tar.xz
(svn r16529) -Fix [NoAI]: StationIDs from oilrigs were not considered valid by the API.
Diffstat (limited to 'src')
-rw-r--r--src/ai/api/ai_station.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_station.cpp b/src/ai/api/ai_station.cpp
index 5d73b147b..1a7ef468d 100644
--- a/src/ai/api/ai_station.cpp
+++ b/src/ai/api/ai_station.cpp
@@ -18,7 +18,7 @@
/* static */ bool AIStation::IsValidStation(StationID station_id)
{
const Station *st = ::Station::GetIfValid(station_id);
- return st != NULL && st->owner == _current_company;
+ return st != NULL && (st->owner == _current_company || st->owner == OWNER_NONE);
}
/* static */ StationID AIStation::GetStationID(TileIndex tile)