summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-14 08:07:20 +0000
committerrubidium <rubidium@openttd.org>2007-05-14 08:07:20 +0000
commitfcb5e74fbb66f7008c56dfe2e61940e0c9658932 (patch)
treec22121bc557a8c8b153119edd0f8129a084b8f6f /src/roadveh_cmd.cpp
parent29ebda5b1521a089c89b1bc6190347a876554814 (diff)
downloadopenttd-fcb5e74fbb66f7008c56dfe2e61940e0c9658932.tar.xz
(svn r9833) -Fix: also 'leave' the station when leaving for automatic servicing.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index aff10c3f8..c7da5fcd0 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1686,6 +1686,9 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
return;
}
+ if (v->current_order.type == OT_LOADING) v->LeaveStation();
+ ClearSlot(v);
+
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
v->current_order.dest = depot->index;