summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-15 18:44:22 +0000
committerrubidium <rubidium@openttd.org>2008-01-15 18:44:22 +0000
commit576f8ad93e5eb2d2c2777ae1e448ae80e80d14ba (patch)
tree7948f0844d640b0be32729fdeaf9be3da5453758 /src/roadveh_cmd.cpp
parentab7cb0804de68b015dcc774a4fbcc82e356d2c87 (diff)
downloadopenttd-576f8ad93e5eb2d2c2777ae1e448ae80e80d14ba.tar.xz
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index baaca558e..f56e220e3 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -479,13 +479,13 @@ CommandCost CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint3
/* If the current orders are already goto-depot */
if (v->current_order.type == OT_GOTO_DEPOT) {
- if (!!(p2 & DEPOT_SERVICE) == HasBit(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ if (!!(p2 & DEPOT_SERVICE) == HasBit(v->current_order.flags, OF_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same depot.
* Note: the if is (true for requesting service == true for ordered to stop in depot) */
if (flags & DC_EXEC) {
- ClrBit(v->current_order.flags, OFB_PART_OF_ORDERS);
- ToggleBit(v->current_order.flags, OFB_HALT_IN_DEPOT);
+ ClrBit(v->current_order.flags, OF_PART_OF_ORDERS);
+ ToggleBit(v->current_order.flags, OF_HALT_IN_DEPOT);
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
}
return CommandCost();
@@ -495,7 +495,7 @@ CommandCost CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint3
if (flags & DC_EXEC) {
/* If the orders to 'goto depot' are in the orders list (forced servicing),
* then skip to the next order; effectively cancelling this forced service */
- if (HasBit(v->current_order.flags, OFB_PART_OF_ORDERS))
+ if (HasBit(v->current_order.flags, OF_PART_OF_ORDERS))
v->cur_order_index++;
v->current_order.type = OT_DUMMY;
@@ -513,8 +513,8 @@ CommandCost CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint3
ClearSlot(v);
v->current_order.type = OT_GOTO_DEPOT;
- v->current_order.flags = OF_NON_STOP;
- if (!(p2 & DEPOT_SERVICE)) SetBit(v->current_order.flags, OFB_HALT_IN_DEPOT);
+ v->current_order.flags = OFB_NON_STOP;
+ if (!(p2 & DEPOT_SERVICE)) SetBit(v->current_order.flags, OF_HALT_IN_DEPOT);
v->current_order.refit_cargo = CT_INVALID;
v->current_order.dest = dep->index;
v->dest_tile = dep->xy;
@@ -764,8 +764,8 @@ static void ProcessRoadVehOrder(Vehicle *v)
switch (v->current_order.type) {
case OT_GOTO_DEPOT:
/* Let a depot order in the orderlist interrupt. */
- if (!(v->current_order.flags & OF_PART_OF_ORDERS)) return;
- if (v->current_order.flags & OF_SERVICE_IF_NEEDED &&
+ if (!(v->current_order.flags & OFB_PART_OF_ORDERS)) return;
+ if (v->current_order.flags & OFB_SERVICE_IF_NEEDED &&
!VehicleNeedsService(v)) {
UpdateVehicleTimetable(v, true);
v->cur_order_index++;
@@ -1990,7 +1990,7 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
}
if (v->current_order.type == OT_GOTO_DEPOT &&
- v->current_order.flags & OF_NON_STOP &&
+ v->current_order.flags & OFB_NON_STOP &&
!Chance16(1, 20)) {
return;
}
@@ -1999,7 +1999,7 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
ClearSlot(v);
v->current_order.type = OT_GOTO_DEPOT;
- v->current_order.flags = OF_NON_STOP;
+ v->current_order.flags = OFB_NON_STOP;
v->current_order.dest = depot->index;
v->dest_tile = depot->xy;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);