From 68ead6b84f56ad3c93d05ad3e09b7fbb8173cf26 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 22 Jul 2009 08:59:57 +0000 Subject: (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. --- src/station_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/station_gui.cpp') diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 8db32d0ae..6656428a0 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -143,7 +143,7 @@ protected: const Station *st; FOR_ALL_STATIONS(st) { - if (st->owner == owner || (st->owner == OWNER_NONE && !st->IsBuoy() && HasStationInUse(st->index, owner))) { + if (st->owner == owner || (st->owner == OWNER_NONE && HasStationInUse(st->index, owner))) { if (this->facilities & st->facilities) { // only stations with selected facilities int num_waiting_cargo = 0; for (CargoID j = 0; j < NUM_CARGO; j++) { @@ -378,7 +378,7 @@ public: /* Do not do the complex check HasStationInUse here, it may be even false * when the order had been removed and the station list hasn't been removed yet */ - assert(st->owner == owner || (st->owner == OWNER_NONE && !st->IsBuoy())); + assert(st->owner == owner || st->owner == OWNER_NONE); SetDParam(0, st->index); SetDParam(1, st->facilities); @@ -409,7 +409,7 @@ public: const Station *st = this->stations[id_v]; /* do not check HasStationInUse - it is slow and may be invalid */ - assert(st->owner == (Owner)this->window_number || (st->owner == OWNER_NONE && !st->IsBuoy())); + assert(st->owner == (Owner)this->window_number || st->owner == OWNER_NONE); if (_ctrl_pressed) { ShowExtraViewPortWindow(st->xy); -- cgit v1.2.3-70-g09d2