src/timetable_cmd.cpp
changeset 9941 8549448b55fa
parent 9829 48132d8feffd
child 10033 0336744fb8a6
equal deleted inserted replaced
9940:a3a283320355 9941:8549448b55fa
    30 		} else {
    30 		} else {
    31 			v->current_order.wait_time = time;
    31 			v->current_order.wait_time = time;
    32 		}
    32 		}
    33 	}
    33 	}
    34 
    34 
    35 	for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
    35 	for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
    36 		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
    36 		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
    37 	}
    37 	}
    38 }
    38 }
    39 
    39 
    40 /**
    40 /**
   163 		} else {
   163 		} else {
   164 			ClrBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE);
   164 			ClrBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE);
   165 		}
   165 		}
   166 	}
   166 	}
   167 
   167 
   168 	for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
   168 	for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
   169 		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
   169 		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
   170 	}
   170 	}
   171 
   171 
   172 	return CommandCost();
   172 	return CommandCost();
   173 }
   173 }
   213 	 * when this happens. */
   213 	 * when this happens. */
   214 	if (timetabled == 0 && (travelling || v->lateness_counter >= 0)) return;
   214 	if (timetabled == 0 && (travelling || v->lateness_counter >= 0)) return;
   215 
   215 
   216 	v->lateness_counter -= (timetabled - time_taken);
   216 	v->lateness_counter -= (timetabled - time_taken);
   217 
   217 
   218 	for (v = GetFirstVehicleFromSharedList(v); v != NULL; v = v->next_shared) {
   218 	for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
   219 		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
   219 		InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
   220 	}
   220 	}
   221 }
   221 }