equal
deleted
inserted
replaced
638 } |
638 } |
639 |
639 |
640 return true; |
640 return true; |
641 } |
641 } |
642 |
642 |
|
643 /* Check if a rail station tile is traversable. |
|
644 * XXX This could be cached (during build) in the map array to save on all the dereferencing */ |
|
645 bool IsStationTileBlocked(TileIndex tile) |
|
646 { |
|
647 const Station *st; |
|
648 const StationSpec *statspec; |
|
649 uint specindex; |
|
650 |
|
651 if (!IsCustomStationSpecIndex(tile)) return false; |
|
652 |
|
653 st = GetStationByTile(tile); |
|
654 specindex = GetCustomStationSpecIndex(tile); |
|
655 if (specindex >= st->num_specs) return false; |
|
656 |
|
657 statspec = st->speclist[specindex].spec; |
|
658 if (statspec == NULL) return false; |
|
659 |
|
660 return HASBIT(statspec->blocked, GetStationGfx(tile)); |
|
661 } |