changeset 12116:84e88a206e66 draft

(svn r16529) -Fix [NoAI]: StationIDs from oilrigs were not considered valid by the API.
author yexo <yexo@openttd.org>
date Sun, 07 Jun 2009 13:29:09 +0000
parents 6318d41ef9ef
children aecfa01ba5fb
files src/ai/api/ai_station.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)