Changeset - r11042:9a00dc9e0e93
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-02-06 21:30:18
rubidium@openttd.org
(svn r15382) -Fix [FS#2466]: multiple vehicles could be filling the timetable and only the data from one vehicle would be taken. Now only allow one to be filling at a time.
1 file changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/timetable_cmd.cpp
Show inline comments
 
@@ -166,8 +166,13 @@ CommandCost CmdAutofillTimetable(TileInd
 
		}
 
	}
 

	
 
	for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
 
		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
 
	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);
 
		}
 
		InvalidateWindow(WC_VEHICLE_TIMETABLE, v2->index);
 
	}
 

	
 
	return CommandCost();
0 comments (0 inline, 0 general)