Changeset - r16915:70e55512434f
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2010-12-29 20:20:38
rubidium@openttd.org
(svn r21660) -Fix [FS#4354]: autofill timetable had side effects in test mode, possibly causing desyncs in MP
1 file changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/timetable_cmd.cpp
Show inline comments
 
@@ -216,15 +216,15 @@ CommandCost CmdAutofillTimetable(TileInd
 
			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();
0 comments (0 inline, 0 general)