summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/aircraft_cmd.cpp2
-rw-r--r--src/roadveh_cmd.cpp2
-rw-r--r--src/ship_cmd.cpp4
-rw-r--r--src/train_cmd.cpp6
-rw-r--r--src/vehicle.cpp2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 92720a335..e3045be0a 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1344,8 +1344,8 @@ static void ProcessAircraftOrder(Vehicle *v)
if (!(v->current_order.flags & OF_PART_OF_ORDERS)) return;
if (v->current_order.flags & OF_SERVICE_IF_NEEDED &&
!VehicleNeedsService(v)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
break;
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index fc7873deb..ce219bda6 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -758,8 +758,8 @@ static void ProcessRoadVehOrder(Vehicle *v)
if (!(v->current_order.flags & OF_PART_OF_ORDERS)) return;
if (v->current_order.flags & OF_SERVICE_IF_NEEDED &&
!VehicleNeedsService(v)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
break;
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 92caf6e5b..2a76c8d8c 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -258,8 +258,8 @@ static void ProcessShipOrder(Vehicle *v)
if (!(v->current_order.flags & OF_PART_OF_ORDERS)) return;
if (v->current_order.flags & OF_SERVICE_IF_NEEDED &&
!VehicleNeedsService(v)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
break;
@@ -696,9 +696,9 @@ static void ShipController(Vehicle *v)
DistanceManhattan(v->dest_tile, gp.new_tile) <= 3) {
/* We got within 3 tiles of our target buoy, so let's skip to our
* next order */
+ UpdateVehicleTimetable(v, true);
v->cur_order_index++;
v->current_order.type = OT_DUMMY;
- UpdateVehicleTimetable(v, true);
InvalidateVehicleOrder(v);
} else {
/* Non-buoy orders really need to reach the tile */
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 00a49fa6b..92a30bcbf 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2380,8 +2380,8 @@ static bool ProcessTrainOrder(Vehicle *v)
if (!(v->current_order.flags & OF_PART_OF_ORDERS)) return false;
if ((v->current_order.flags & OF_SERVICE_IF_NEEDED) &&
!VehicleNeedsService(v)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
break;
@@ -2395,9 +2395,9 @@ static bool ProcessTrainOrder(Vehicle *v)
/* check if we've reached the waypoint? */
bool at_waypoint = false;
if (v->current_order.type == OT_GOTO_WAYPOINT && v->tile == v->dest_tile) {
+ UpdateVehicleTimetable(v, true);
v->cur_order_index++;
at_waypoint = true;
- UpdateVehicleTimetable(v, true);
}
/* check if we've reached a non-stop station while TTDPatch nonstop is enabled.. */
@@ -2405,8 +2405,8 @@ static bool ProcessTrainOrder(Vehicle *v)
v->current_order.flags & OF_NON_STOP &&
IsTileType(v->tile, MP_STATION) &&
v->current_order.dest == GetStationIndex(v->tile)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
/* Get the current order */
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 4dc94f69b..3e3d7f46e 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2368,8 +2368,8 @@ void VehicleEnterDepot(Vehicle *v)
if (HASBIT(t.flags, OFB_PART_OF_ORDERS)) {
/* Part of orders */
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
} else if (HASBIT(t.flags, OFB_HALT_IN_DEPOT)) {
/* Force depot visit */
v->vehstatus |= VS_STOPPED;