summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_buoylist.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-22 08:59:57 +0000
committerrubidium <rubidium@openttd.org>2009-07-22 08:59:57 +0000
commit68ead6b84f56ad3c93d05ad3e09b7fbb8173cf26 (patch)
treeee33bd19b96a138530a84e86e7ffd60c0700f9d9 /src/ai/api/ai_buoylist.cpp
parent2646a99d29535a44c5998f080131cbca2e85bdcf (diff)
downloadopenttd-68ead6b84f56ad3c93d05ad3e09b7fbb8173cf26.tar.xz
(svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
Diffstat (limited to 'src/ai/api/ai_buoylist.cpp')
-rw-r--r--src/ai/api/ai_buoylist.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/api/ai_buoylist.cpp b/src/ai/api/ai_buoylist.cpp
index 0ba66fb39..1412c7860 100644
--- a/src/ai/api/ai_buoylist.cpp
+++ b/src/ai/api/ai_buoylist.cpp
@@ -3,12 +3,12 @@
/** @file ai_buoylist.cpp Implementation of AIBuoyList and friends. */
#include "ai_buoylist.hpp"
-#include "../../station_base.h"
+#include "../../waypoint.h"
AIBuoyList::AIBuoyList()
{
- Station *st;
- FOR_ALL_STATIONS(st) {
- if (st->IsBuoy()) this->AddItem(st->xy);
+ Waypoint *wp;
+ FOR_ALL_WAYPOINTS(wp) {
+ if (wp->facilities & FACIL_DOCK) this->AddItem(wp->xy);
}
}