summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-04-29 22:51:12 +0000
committerrubidium <rubidium@openttd.org>2007-04-29 22:51:12 +0000
commitcbd9a1bf0d1cf5ab2c73177cc58608e4ca463175 (patch)
tree1fcdaf34137bec26ded36630476dba64d22feb00
parentec9ac99d01c74f1cb63e8c934c8a13d8aca2422a (diff)
downloadopenttd-cbd9a1bf0d1cf5ab2c73177cc58608e4ca463175.tar.xz
(svn r9756) -Fix [FS#755]: LeaveStation wasn't always called when a station was left.
-rw-r--r--src/train_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e00c0bc29..0a990d87f 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3448,6 +3448,8 @@ static void CheckIfTrainNeedsService(Vehicle *v)
return;
}
+ if (v->current_order.type == OT_LOADING) v->LeaveStation();
+
v->current_order.type = OT_GOTO_DEPOT;
v->current_order.flags = OF_NON_STOP;
v->current_order.dest = depot->index;