summaryrefslogtreecommitdiff
path: root/src/vehicle.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
commit736640fd87a6fd68a79a1d135f4a02b699135aa9 (patch)
tree7948f0844d640b0be32729fdeaf9be3da5453758 /src/vehicle.cpp
parente93885537588a200c296ca4f95e7791da6e9c8bb (diff)
downloadopenttd-736640fd87a6fd68a79a1d135f4a02b699135aa9.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/vehicle.cpp')
-rw-r--r--src/vehicle.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index b27c768f2..580953e93 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -104,10 +104,10 @@ void VehicleServiceInDepot(Vehicle *v)
bool VehicleNeedsService(const Vehicle *v)
{
if (v->vehstatus & (VS_STOPPED | VS_CRASHED)) return false;
- if (v->current_order.type != OT_GOTO_DEPOT || !(v->current_order.flags & OF_PART_OF_ORDERS)) { // Don't interfere with a depot visit by the order list
+ if (v->current_order.type != OT_GOTO_DEPOT || !(v->current_order.flags & OFB_PART_OF_ORDERS)) { // Don't interfere with a depot visit by the order list
if (_patches.gotodepot && VehicleHasDepotOrders(v)) return false;
if (v->current_order.type == OT_LOADING) return false;
- if (v->current_order.type == OT_GOTO_DEPOT && v->current_order.flags & OF_HALT_IN_DEPOT) return false;
+ if (v->current_order.type == OT_GOTO_DEPOT && v->current_order.flags & OFB_HALT_IN_DEPOT) return false;
}
if (_patches.no_servicing_if_no_breakdowns && _opt.diff.vehicle_breakdowns == 0) {
@@ -615,7 +615,7 @@ static Vehicle* _first_veh_in_depot_list;
void VehicleEnteredDepotThisTick(Vehicle *v)
{
/* we need to set v->leave_depot_instantly as we have no control of it's contents at this time */
- if (HasBit(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HasBit(v->current_order.flags, OFB_PART_OF_ORDERS) && v->current_order.type == OT_GOTO_DEPOT) {
+ if (HasBit(v->current_order.flags, OF_HALT_IN_DEPOT) && !HasBit(v->current_order.flags, OF_PART_OF_ORDERS) && v->current_order.type == OT_GOTO_DEPOT) {
/* we keep the vehicle in the depot since the user ordered it to stay */
v->leave_depot_instantly = false;
} else {
@@ -2156,7 +2156,7 @@ uint8 CalcPercentVehicleFilled(Vehicle *v, StringID *color)
max += v->cargo_cap;
if (v->cargo_cap != 0) {
unloading += HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) ? 1 : 0;
- loading |= (u->current_order.flags & OF_UNLOAD) == 0 && st->goods[v->cargo_type].days_since_pickup != 255;
+ loading |= (u->current_order.flags & OFB_UNLOAD) == 0 && st->goods[v->cargo_type].days_since_pickup != 255;
cars++;
}
}
@@ -2242,11 +2242,11 @@ void VehicleEnterDepot(Vehicle *v)
}
}
- if (HasBit(t.flags, OFB_PART_OF_ORDERS)) {
+ if (HasBit(t.flags, OF_PART_OF_ORDERS)) {
/* Part of orders */
UpdateVehicleTimetable(v, true);
v->cur_order_index++;
- } else if (HasBit(t.flags, OFB_HALT_IN_DEPOT)) {
+ } else if (HasBit(t.flags, OF_HALT_IN_DEPOT)) {
/* Force depot visit */
v->vehstatus |= VS_STOPPED;
if (v->owner == _local_player) {
@@ -3095,14 +3095,14 @@ void Vehicle::BeginLoading()
this->current_order.dest == this->last_station_visited) {
/* Arriving at the ordered station.
* Keep the load/unload flags, as we (obviously) still need them. */
- this->current_order.flags &= OF_FULL_LOAD | OF_UNLOAD | OF_TRANSFER;
+ this->current_order.flags &= OFB_FULL_LOAD | OFB_UNLOAD | OFB_TRANSFER;
/* Furthermore add the Non Stop flag to mark that this station
* is the actual destination of the vehicle, which is (for example)
* necessary to be known for HandleTrainLoading to determine
* whether the train is lost or not; not marking a train lost
* that arrives at random stations is bad. */
- this->current_order.flags |= OF_NON_STOP;
+ this->current_order.flags |= OFB_NON_STOP;
UpdateVehicleTimetable(this, true);
} else {
/* This is just an unordered intermediate stop */
@@ -3128,7 +3128,7 @@ void Vehicle::LeaveStation()
assert(current_order.type == OT_LOADING);
/* Only update the timetable if the vehicle was supposed to stop here. */
- if (current_order.flags & OF_NON_STOP) UpdateVehicleTimetable(this, false);
+ if (current_order.flags & OFB_NON_STOP) UpdateVehicleTimetable(this, false);
current_order.type = OT_LEAVESTATION;
current_order.flags = 0;
@@ -3155,7 +3155,7 @@ void Vehicle::HandleLoading(bool mode)
this->LeaveStation();
/* If this was not the final order, don't remove it from the list. */
- if (!(b.flags & OF_NON_STOP)) return;
+ if (!(b.flags & OFB_NON_STOP)) return;
break;
}