(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)

This commit is contained in:
smatz
2008-12-26 18:01:15 +00:00
parent 2e2086f3f8
commit 419f6e099f
12 changed files with 70 additions and 60 deletions

View File

@@ -4447,7 +4447,7 @@ void Train::OnNewDay()
/* update destination */
if (this->current_order.IsType(OT_GOTO_STATION)) {
TileIndex tile = GetStation(this->current_order.GetDestination())->train_tile;
if (tile != 0) this->dest_tile = tile;
if (tile != INVALID_TILE) this->dest_tile = tile;
}
if (this->running_ticks != 0) {