diff options
author | rubidium <rubidium@openttd.org> | 2010-12-29 20:20:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-12-29 20:20:38 +0000 |
commit | 83d7634122278bde9feabeda284286652cfb40ca (patch) | |
tree | 53b33b71d023d2fd40f572d56f3580e63a0e501a | |
parent | affd8b9d7ba3bdd0906d23391e7d227f15627d0d (diff) | |
download | openttd-83d7634122278bde9feabeda284286652cfb40ca.tar.xz |
(svn r21660) -Fix [FS#4354]: autofill timetable had side effects in test mode, possibly causing desyncs in MP
-rw-r--r-- | src/timetable_cmd.cpp | 14 |
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(); |