summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-09-02 20:03:56 +0000
committeryexo <yexo@openttd.org>2009-09-02 20:03:56 +0000
commit668da9e9001e73af8347f589106b834749e72e66 (patch)
tree1f66ee3c01ad83fbc8151b95539f7f494e240314
parent284b92f3e9551447e3d6064cf87501f7f7651cfa (diff)
downloadopenttd-668da9e9001e73af8347f589106b834749e72e66.tar.xz
(svn r17386) -Fix (r17011): AIBaseStation::IsValidBaseStation() returned false for stations with OWNER_NONE
-rw-r--r--src/ai/api/ai_basestation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_basestation.cpp b/src/ai/api/ai_basestation.cpp
index cc41a3b84..e6c7fb6b4 100644
--- a/src/ai/api/ai_basestation.cpp
+++ b/src/ai/api/ai_basestation.cpp
@@ -22,7 +22,7 @@
/* static */ bool AIBaseStation::IsValidBaseStation(StationID station_id)
{
const BaseStation *st = ::BaseStation::GetIfValid(station_id);
- return st != NULL && st->owner == _current_company;
+ return st != NULL && (st->owner == _current_company || st->owner == OWNER_NONE);
}
/* static */ char *AIBaseStation::GetName(StationID station_id)