summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 42562ee1f..406c55269 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -394,7 +394,7 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
ClearSlot(v);
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP | OF_HALT_IN_DEPOT;
- v->current_order.station = dep->index;
+ v->current_order.dest.depot = dep->index;
v->dest_tile = dep->xy;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
@@ -649,7 +649,7 @@ static void ProcessRoadVehOrder(Vehicle *v)
if (order->type == v->current_order.type &&
order->flags == v->current_order.flags &&
- order->station == v->current_order.station) {
+ order->dest.station == v->current_order.dest.station) {
return;
}
@@ -659,12 +659,12 @@ static void ProcessRoadVehOrder(Vehicle *v)
case OT_GOTO_STATION: {
const RoadStop* rs;
- if (order->station == v->last_station_visited) {
+ if (order->dest.station == v->last_station_visited) {
v->last_station_visited = INVALID_STATION;
}
rs = GetPrimaryRoadStop(
- GetStation(order->station),
+ GetStation(order->dest.station),
v->cargo_type == CT_PASSENGERS ? RS_BUS : RS_TRUCK
);
@@ -690,7 +690,7 @@ static void ProcessRoadVehOrder(Vehicle *v)
}
case OT_GOTO_DEPOT:
- v->dest_tile = GetDepot(order->station)->xy;
+ v->dest_tile = GetDepot(order->dest.depot)->xy;
break;
default:
@@ -1478,7 +1478,7 @@ again:
v->current_order.flags = 0;
if (old_order.type == OT_GOTO_STATION &&
- v->current_order.station == v->last_station_visited) {
+ v->current_order.dest.station == v->last_station_visited) {
v->current_order.flags =
(old_order.flags & (OF_FULL_LOAD | OF_UNLOAD | OF_TRANSFER)) | OF_NON_STOP;
}
@@ -1520,9 +1520,9 @@ again:
if (v->current_order.type != OT_GOTO_STATION) {
DEBUG(ms, 0) ("Multistop: -- Current order type (%d) is not OT_GOTO_STATION.", v->current_order.type);
} else {
- if (v->current_order.station != st->index)
+ if (v->current_order.dest.station != st->index)
DEBUG(ms, 0) ("Multistop: -- Current station %d is not target station in current_order.station (%d).",
- st->index, v->current_order.station);
+ st->index, v->current_order.dest.station);
}
DEBUG(ms, 0) (" -- Force a slot clearing.");
@@ -1637,7 +1637,7 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
- v->current_order.station = depot->index;
+ v->current_order.dest.depot = depot->index;
v->dest_tile = depot->xy;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
@@ -1665,7 +1665,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
/* update destination */
if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot == NULL && !(v->vehstatus & VS_CRASHED)) {
- Station* st = GetStation(v->current_order.station);
+ Station* st = GetStation(v->current_order.dest.station);
RoadStop* rs = GetPrimaryRoadStop(st, v->cargo_type == CT_PASSENGERS ? RS_BUS : RS_TRUCK);
RoadStop* best = NULL;