mirror of https://github.com/OpenTTD/OpenTTD
(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.
parent
c52680a131
commit
4cc07196ac
|
@ -166,8 +166,13 @@ CommandCost CmdAutofillTimetable(TileIndex tile, uint32 flags, uint32 p1, uint32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
|
for (Vehicle *v2 = v->FirstShared(); v2 != NULL; v2 = v2->NextShared()) {
|
||||||
InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
|
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();
|
return CommandCost();
|
||||||
|
|
Loading…
Reference in New Issue