diff options
author | celestar <celestar@openttd.org> | 2005-03-20 08:43:29 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-03-20 08:43:29 +0000 |
commit | fbc2eacadedf6638ec483d4a1523b0d88b2330c9 (patch) | |
tree | 8b29056376eae4d8c996e8f1964095b4f7d3081f /roadveh_cmd.c | |
parent | 087d78d4655c36996396b3e98d489891d767252c (diff) | |
download | openttd-fbc2eacadedf6638ec483d4a1523b0d88b2330c9.tar.xz |
(svn r2034) -Codechange: Replaced the rather meaningless LOAD and UNLOAD flags for depots by something more meaningful
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 2450387ca..d868624c7 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -334,8 +334,10 @@ int32 CmdSendRoadVehToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (v->current_order.type == OT_GOTO_DEPOT) { if (flags & DC_EXEC) { - if (v->current_order.flags & OF_UNLOAD) + + if (HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) v->cur_order_index++; + v->current_order.type = OT_DUMMY; v->current_order.flags = 0; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); @@ -349,7 +351,7 @@ int32 CmdSendRoadVehToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { v->current_order.type = OT_GOTO_DEPOT; - v->current_order.flags = OF_NON_STOP | OF_FULL_LOAD; + v->current_order.flags = OF_NON_STOP | OF_HALT_IN_DEPOT; v->current_order.station = depot->index; v->dest_tile = depot->xy; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); @@ -1531,9 +1533,9 @@ void RoadVehEnterDepot(Vehicle *v) v->current_order.flags = 0; // Part of the orderlist? - if (t.flags & OF_UNLOAD) { + if (HASBIT(t.flags, OFB_PART_OF_ORDERS)) { v->cur_order_index++; - } else if (t.flags & OF_FULL_LOAD) { + } else if (HASBIT(t.flags, OFB_HALT_IN_DEPOT)) { v->vehstatus |= VS_STOPPED; if (v->owner == _local_player) { SetDParam(0, v->unitnumber); @@ -1583,7 +1585,7 @@ static void CheckIfRoadVehNeedsService(Vehicle *v) // Don't interfere with a depot visit scheduled by the user, or a // depot visit by the order list. if (v->current_order.type == OT_GOTO_DEPOT && - (v->current_order.flags & (OF_FULL_LOAD | OF_UNLOAD)) != 0) + (v->current_order.flags & (OF_HALT_IN_DEPOT | OF_PART_OF_ORDERS)) != 0) return; //If we already got a slot at a stop, use that FIRST, and go to a depot later |