summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-06-26 14:43:41 +0000
committermaedhros <maedhros@openttd.org>2007-06-26 14:43:41 +0000
commitcc63a1659f3a43ad92ea7731780a18b26c81e6eb (patch)
tree15d07e804331dda54e76ed4e84a6285fae4d4acc /src/vehicle.cpp
parent65455f5e07e16dcc889b3f585e4a66b11c82870e (diff)
downloadopenttd-cc63a1659f3a43ad92ea7731780a18b26c81e6eb.tar.xz
(svn r10341) -Fix (r10236): Only update the timetable when leaving stations if this is a scheduled stop.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 3e3d7f46e..a97c027d2 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -3160,14 +3160,16 @@ void Vehicle::BeginLoading()
void Vehicle::LeaveStation()
{
assert(current_order.type == OT_LOADING);
+
+ /* Only update the timetable if the vehicle was supposed to stop here. */
+ if (current_order.flags & OF_NON_STOP) UpdateVehicleTimetable(this, false);
+
current_order.type = OT_LEAVESTATION;
current_order.flags = 0;
GetStation(this->last_station_visited)->loading_vehicles.remove(this);
HideFillingPercent(this->fill_percent_te_id);
this->fill_percent_te_id = INVALID_TE_ID;
-
- UpdateVehicleTimetable(this, false);
}