summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index c9fc22cba..5854ba489 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2570,7 +2570,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
*/
static bool StationHandleBigTick(BaseStation *st)
{
- if ((st->facilities & ~FACIL_WAYPOINT) == 0 && ++st->delete_ctr >= 8) {
+ if (!st->IsInUse() && ++st->delete_ctr >= 8) {
delete st;
return false;
}
@@ -2698,7 +2698,7 @@ static void UpdateStationRating(Station *st)
/* called for every station each tick */
static void StationHandleSmallTick(BaseStation *st)
{
- if ((st->facilities & FACIL_WAYPOINT) != 0 || st->facilities == 0) return;
+ if ((st->facilities & FACIL_WAYPOINT) != 0 || !st->IsInUse()) return;
byte b = st->delete_ctr + 1;
if (b >= 185) b = 0;