equal
deleted
inserted
replaced
135 do { |
135 do { |
136 if (v->cargo_cap == 0) continue; |
136 if (v->cargo_cap == 0) continue; |
137 /* Now we found a cargo type being carried on the train and we will see if it is possible to carry to this one */ |
137 /* Now we found a cargo type being carried on the train and we will see if it is possible to carry to this one */ |
138 if (v->cargo_type == new_cargo_type) return CT_NO_REFIT; |
138 if (v->cargo_type == new_cargo_type) return CT_NO_REFIT; |
139 if (CanRefitTo(engine_type, v->cargo_type)) return v->cargo_type; |
139 if (CanRefitTo(engine_type, v->cargo_type)) return v->cargo_type; |
140 } while ((v=v->next) != NULL); |
140 } while ((v = v->next) != NULL); |
141 return CT_NO_REFIT; // We failed to find a cargo type on the old vehicle and we will not refit the new one |
141 return CT_NO_REFIT; // We failed to find a cargo type on the old vehicle and we will not refit the new one |
142 } |
142 } |
143 |
143 |
144 /* Replaces a vehicle (used to be called autorenew) |
144 /* Replaces a vehicle (used to be called autorenew) |
145 * This function is only called from MaybeReplaceVehicle() |
145 * This function is only called from MaybeReplaceVehicle() |