mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r14993) -Fix (r14957, r14975): Do not reverse the train with OT_LEAVESTATION as that breaks PBS prediction.
This commit is contained in:
parent
f5cff71284
commit
a6fc079c52
@ -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' */
|
||||
|
Loading…
Reference in New Issue
Block a user