From 83d7634122278bde9feabeda284286652cfb40ca Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 29 Dec 2010 20:20:38 +0000 Subject: (svn r21660) -Fix [FS#4354]: autofill timetable had side effects in test mode, possibly causing desyncs in MP --- src/timetable_cmd.cpp | 14 +++++++------- 1 file 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(); -- cgit v1.2.3-70-g09d2