(svn r14096) -Codechange: merge the shared order's vehicle list management to a single location.

This commit is contained in:
rubidium
2008-08-17 19:56:17 +00:00
parent ca3f1f6406
commit abd9f74871
9 changed files with 118 additions and 113 deletions

View File

@@ -32,7 +32,7 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time
}
}
for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
}
}
@@ -165,7 +165,7 @@ CommandCost CmdAutofillTimetable(TileIndex tile, uint32 flags, uint32 p1, uint32
}
}
for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
}
@@ -215,7 +215,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling)
v->lateness_counter -= (timetabled - time_taken);
for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
}
}