File diff r27319:ea7c4a418203 → r27320:a815d811abc1
src/linkgraph/refresh.cpp
Show inline comments
 
@@ -141,16 +141,16 @@ bool LinkRefresher::HandleRefit(CargoID 
 

	
 
/**
 
 * Restore capacities and refit_capacities as vehicle might have been able to load now.
 
 */
 
void LinkRefresher::ResetRefit()
 
{
 
	for (RefitList::iterator it(this->refit_capacities.begin()); it != this->refit_capacities.end(); ++it) {
 
		if (it->remaining == it->capacity) continue;
 
		this->capacities[it->cargo] += it->capacity - it->remaining;
 
		it->remaining = it->capacity;
 
	for (auto &it : this->refit_capacities) {
 
		if (it.remaining == it.capacity) continue;
 
		this->capacities[it.cargo] += it.capacity - it.remaining;
 
		it.remaining = it.capacity;
 
	}
 
}
 

	
 
/**
 
 * Predict the next order the vehicle will execute and resolve conditionals by
 
 * recursion and return next non-conditional order in list.