diff options
author | tron <tron@openttd.org> | 2006-03-24 08:55:08 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-24 08:55:08 +0000 |
commit | 9be713f1ae0cff0bc06bbef395fda8bf829e38c2 (patch) | |
tree | 4f245f2fb33365183177a0e7de46103b9c2464d3 /npf.c | |
parent | 4b0e8947d5053d0987e9d9024156786acd3aec67 (diff) | |
download | openttd-9be713f1ae0cff0bc06bbef395fda8bf829e38c2.tar.xz |
(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
Diffstat (limited to 'npf.c')
-rw-r--r-- | npf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -10,6 +10,7 @@ #include "macros.h" #include "pathfind.h" #include "station.h" +#include "station_map.h" #include "tile.h" #include "depot.h" #include "tunnel_map.h" @@ -423,7 +424,7 @@ static int32 NPFFindStationOrTile(AyStar* as, OpenListNode *current) * is correct */ if ( (fstd->station_index == INVALID_STATION && tile == fstd->dest_coords) || /* We've found the tile, or */ - (IsTileType(tile, MP_STATION) && _m[tile].m2 == fstd->station_index) /* the station */ + (IsTileType(tile, MP_STATION) && GetStationIndex(tile) == fstd->station_index) /* the station */ ) { return AYSTAR_FOUND_END_NODE; } else { |