src/npf.cpp
changeset 8836 f6f1ea3d7e93
parent 8785 871586967963
child 8840 332412c2e9c1
equal deleted inserted replaced
8835:8fa962d90b63 8836:f6f1ea3d7e93
   978 	 * save the station id for ships. For roadvehs we don't store it either,
   978 	 * save the station id for ships. For roadvehs we don't store it either,
   979 	 * because multistop depends on vehicles actually reaching the exact
   979 	 * because multistop depends on vehicles actually reaching the exact
   980 	 * dest_tile, not just any stop of that station.
   980 	 * dest_tile, not just any stop of that station.
   981 	 * So only for train orders to stations we fill fstd->station_index, for all
   981 	 * So only for train orders to stations we fill fstd->station_index, for all
   982 	 * others only dest_coords */
   982 	 * others only dest_coords */
   983 	if (v->current_order.type == OT_GOTO_STATION && v->type == VEH_TRAIN) {
   983 	if (v->current_order.IsType(OT_GOTO_STATION) && v->type == VEH_TRAIN) {
   984 		fstd->station_index = v->current_order.dest;
   984 		fstd->station_index = v->current_order.dest;
   985 		/* Let's take the closest tile of the station as our target for trains */
   985 		/* Let's take the closest tile of the station as our target for trains */
   986 		fstd->dest_coords = CalcClosestStationTile(v->current_order.dest, v->tile);
   986 		fstd->dest_coords = CalcClosestStationTile(v->current_order.dest, v->tile);
   987 	} else {
   987 	} else {
   988 		fstd->dest_coords = v->dest_tile;
   988 		fstd->dest_coords = v->dest_tile;