(svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that depot.
authorrubidium
Sun, 09 Sep 2007 17:42:59 +0000
changeset 7551 7e76a6be5873
parent 7550 dc1fcce38fb8
child 7552 56aa62dba204
(svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that depot.
src/aircraft_cmd.cpp
src/roadveh_cmd.cpp
src/ship_cmd.cpp
src/train_cmd.cpp
--- a/src/aircraft_cmd.cpp	Sun Sep 09 15:32:46 2007 +0000
+++ b/src/aircraft_cmd.cpp	Sun Sep 09 17:42:59 2007 +0000
@@ -568,6 +568,7 @@
 			 * Now we change the setting to apply the new one and let the vehicle head for the same hangar.
 			 * Note: the if is (true for requesting service == true for ordered to stop in hangar) */
 			if (flags & DC_EXEC) {
+				CLRBIT(v->current_order.flags, OFB_PART_OF_ORDERS);
 				TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT);
 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 			}
--- a/src/roadveh_cmd.cpp	Sun Sep 09 15:32:46 2007 +0000
+++ b/src/roadveh_cmd.cpp	Sun Sep 09 17:42:59 2007 +0000
@@ -477,6 +477,7 @@
 			 * 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);
 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 			}
--- a/src/ship_cmd.cpp	Sun Sep 09 15:32:46 2007 +0000
+++ b/src/ship_cmd.cpp	Sun Sep 09 17:42:59 2007 +0000
@@ -1004,6 +1004,7 @@
 			 * 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);
 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 			}
--- a/src/train_cmd.cpp	Sun Sep 09 15:32:46 2007 +0000
+++ b/src/train_cmd.cpp	Sun Sep 09 17:42:59 2007 +0000
@@ -1893,6 +1893,7 @@
 			 * 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);
 				InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 			}