summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-03-08 22:28:59 +0000
committermatthijs <matthijs@openttd.org>2005-03-08 22:28:59 +0000
commit82e55eb591312a96b2f9b46f17fa80b846b2974a (patch)
tree1ac9275c68b6fabc07d7288d74a57fb37e1823d5 /npf.c
parent05455047a116d4d95a85f62257fcafcb396bd69b (diff)
downloadopenttd-82e55eb591312a96b2f9b46f17fa80b846b2974a.tar.xz
(svn r1968) - Fix: [NPF] Mixed declarations and statements
Diffstat (limited to 'npf.c')
-rw-r--r--npf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/npf.c b/npf.c
index 20e54c982..2192a9f21 100644
--- a/npf.c
+++ b/npf.c
@@ -410,6 +410,8 @@ int32 NPFFindDepot(AyStar* as, AyStarNode *node) {
/* Will find a station identified using the NPFFindStationOrTileData */
int32 NPFFindStationOrTile(AyStar* as, AyStarNode *node) {
+ NPFFindStationOrTileData* fstd = (NPFFindStationOrTileData*)as->user_target;
+ TileIndex tile = node->tile;
/* See if we checked this before */
if (NPFGetFlag(node, NPF_FLAG_TARGET_CHECKED))
@@ -419,8 +421,6 @@ int32 NPFFindStationOrTile(AyStar* as, AyStarNode *node) {
/* If GetNeighbours said we could get here, we assume the station type
* is correct */
- NPFFindStationOrTileData* fstd = (NPFFindStationOrTileData*)as->user_target;
- TileIndex tile = node->tile;
if (
(fstd->station_index == -1 && tile == fstd->dest_coords) || /* We've found the tile, or */
(IsTileType(tile, MP_STATION) && _map2[tile] == fstd->station_index) /* the station */