summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index ae21c5b19..b88811bdf 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -527,7 +527,7 @@ 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)) {
+ 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) {
// we keep the vehicle in the depot since the user ordered it to stay
v->leave_depot_instantly = false;
} else {