summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-01-11 15:39:49 +0000
committerfrosch <frosch@openttd.org>2009-01-11 15:39:49 +0000
commita6fc079c52b14e30a1ca0ef5186f64e11f8b4a42 (patch)
tree4da54b65576115aa3dd2b1ee1072b001f4c8e74f /src
parentf5cff712844a1fe853b750cba242f04b4e960c0e (diff)
downloadopenttd-a6fc079c52b14e30a1ca0ef5186f64e11f8b4a42.tar.xz
(svn r14993) -Fix (r14957, r14975): Do not reverse the train with OT_LEAVESTATION as that breaks PBS prediction.
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 1ed39f811..787ace3e4 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3652,12 +3652,6 @@ static void TrainController(Vehicle *v, Vehicle *nomove, bool update_image)
{
Vehicle *prev;
- if (v->current_order.IsType(OT_LEAVESTATION)) {
- v->current_order.Free();
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
- return;
- }
-
/* For every vehicle after and including the given vehicle */
for (prev = v->Previous(); v != nomove; prev = v, v = v->Next()) {
DiagDirection enterdir = DIAGDIR_BEGIN;
@@ -4336,6 +4330,12 @@ static void TrainLocoHandler(Vehicle *v, bool mode)
}
}
+ if (v->current_order.IsType(OT_LEAVESTATION)) {
+ v->current_order.Free();
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
+ return;
+ }
+
int j = UpdateTrainSpeed(v);
/* we need to invalidate the widget if we are stopping from 'Stopping 0 km/h' to 'Stopped' */