summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-31 11:33:21 +0000
committerdarkvater <darkvater@openttd.org>2005-01-31 11:33:21 +0000
commit9776f2350be445c62d6685334fd3ae4b114c78c5 (patch)
tree6fda0b1d29323dcfe736c4043c80f59b29fab173 /npf.c
parenta2dec6c32a8a7907fc3faaae761c97132c11a088 (diff)
downloadopenttd-9776f2350be445c62d6685334fd3ae4b114c78c5.tar.xz
(svn r1752) - Fix: MSVC acting up once again, as well as project file updates for the missing files.
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 430c03ebb..c8b456c20 100644
--- a/npf.c
+++ b/npf.c
@@ -764,10 +764,10 @@ void NPFFillWithOrderData(NPFFindStationOrTileData* fstd, Vehicle* v) {
* So only for train orders to stations we fill fstd->station_index, for all
* others only dest_coords */
if ((v->current_order.type) == OT_GOTO_STATION && v->type == VEH_Train) {
+ const Station* st = GetStation(v->current_order.station);
+ TileIndexDiffC center = {st->trainst_w/2, st->trainst_h/2};
fstd->station_index = v->current_order.station;
/* Let's take the center of the station as our target tile for trains */
- Station* st = GetStation(v->current_order.station);
- TileIndexDiffC center = {st->trainst_w/2, st->trainst_h/2};
fstd->dest_coords = TILE_ADD(st->train_tile, ToTileIndexDiff(center));
} else {
fstd->dest_coords = v->dest_tile;