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
commit84c27fc77375fb81db6d916ed9c22589c95d7e8e (patch)
tree1fcdaf34137bec26ded36630476dba64d22feb00
parentdf59f5cd15266db4d29d59b591d739d3e025b206 (diff)
downloadopenttd-84c27fc77375fb81db6d916ed9c22589c95d7e8e.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;