summaryrefslogtreecommitdiff
path: root/src/timetable_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-29 20:20:38 +0000
committerrubidium <rubidium@openttd.org>2010-12-29 20:20:38 +0000
commit83d7634122278bde9feabeda284286652cfb40ca (patch)
tree53b33b71d023d2fd40f572d56f3580e63a0e501a /src/timetable_cmd.cpp
parentaffd8b9d7ba3bdd0906d23391e7d227f15627d0d (diff)
downloadopenttd-83d7634122278bde9feabeda284286652cfb40ca.tar.xz
(svn r21660) -Fix [FS#4354]: autofill timetable had side effects in test mode, possibly causing desyncs in MP
Diffstat (limited to 'src/timetable_cmd.cpp')
-rw-r--r--src/timetable_cmd.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp
index 40064f4a9..dc6125777 100644
--- a/src/timetable_cmd.cpp
+++ b/src/timetable_cmd.cpp
@@ -216,15 +216,15 @@ CommandCost CmdAutofillTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1,
ClrBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE);
ClrBit(v->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
}
- }
- for (Vehicle *v2 = v->FirstShared(); v2 != NULL; v2 = v2->NextShared()) {
- if (v2 != v) {
- /* Stop autofilling; only one vehicle at a time can perform autofill */
- ClrBit(v2->vehicle_flags, VF_AUTOFILL_TIMETABLE);
- ClrBit(v2->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
+ for (Vehicle *v2 = v->FirstShared(); v2 != NULL; v2 = v2->NextShared()) {
+ if (v2 != v) {
+ /* Stop autofilling; only one vehicle at a time can perform autofill */
+ ClrBit(v2->vehicle_flags, VF_AUTOFILL_TIMETABLE);
+ ClrBit(v2->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
+ }
+ SetWindowDirty(WC_VEHICLE_TIMETABLE, v2->index);
}
- SetWindowDirty(WC_VEHICLE_TIMETABLE, v2->index);
}
return CommandCost();