summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-26 18:01:15 +0000
committersmatz <smatz@openttd.org>2008-12-26 18:01:15 +0000
commitc88a6199a7dfc45668da893021d072d4eac6fc5d (patch)
treec063679e6b2160162b5c0ab232ae441833698e1d /src/ai/default
parentbd92143e7bbf9f48008da45fe2c40857f84c3e5c (diff)
downloadopenttd-c88a6199a7dfc45668da893021d072d4eac6fc5d.tar.xz
(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 8e5f4a069..5f7f5a59b 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -3689,11 +3689,11 @@ static void AiStateRemoveStation(Company *c)
// Go through all stations and delete those that aren't in use
FOR_ALL_STATIONS(st) {
if (st->owner == _current_company && !in_use[st->index] &&
- ( (st->bus_stops != NULL && (tile = st->bus_stops->xy) != 0) ||
- (st->truck_stops != NULL && (tile = st->truck_stops->xy) != 0) ||
- (tile = st->train_tile) != 0 ||
- (tile = st->dock_tile) != 0 ||
- (tile = st->airport_tile) != 0)) {
+ ( (st->bus_stops != NULL && (tile = st->bus_stops->xy) != INVALID_TILE) ||
+ (st->truck_stops != NULL && (tile = st->truck_stops->xy) != INVALID_TILE) ||
+ (tile = st->train_tile) != INVALID_TILE ||
+ (tile = st->dock_tile) != INVALID_TILE ||
+ (tile = st->airport_tile) != INVALID_TILE)) {
DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
}
}