diff options
author | rubidium <rubidium@openttd.org> | 2009-12-25 18:01:27 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-25 18:01:27 +0000 |
commit | c8db92e3dde7a29ed153022af2cb216eed1f4162 (patch) | |
tree | 3cf45119503dab41fa058c96fd30db4e96786c09 | |
parent | c4205c2599fe08467ad8f7a3b2484b3a41d29198 (diff) | |
download | openttd-c8db92e3dde7a29ed153022af2cb216eed1f4162.tar.xz |
(svn r18628) -Fix [FS#3422]: (un)loading counter being reset while loading a train and changing the (path) signal setup around the station
-rw-r--r-- | src/train_cmd.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index dd2c7fd19..5fbd2278f 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2913,7 +2913,12 @@ bool TryPathReserve(Train *v, bool mark_as_stuck, bool first_tile_okay) } if (HasBit(v->flags, VRF_TRAIN_STUCK)) { - v->time_counter = 0; + /* This might be called when a train is loading. At that time the counter + * is (mis)used (or rather PBS misuses it) for determining how long to wait + * till going to the next load cycle. If that number is set to 0 the wait + * for loading will be 65535 ticks, which is not what we want. Actually, We + * do not want to reset the waiting period during loading in any case. */ + if (!v->current_order.IsType(OT_LOADING)) v->time_counter = 0; SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } ClrBit(v->flags, VRF_TRAIN_STUCK); |