Improve link graph refresher when using autorefit with cargo-type load orders
This commit is contained in:
@@ -387,7 +387,9 @@ void LinkRefresher::RefreshLinks(const Order *cur, const Order *next, TimetableT
|
||||
SetBit(flags, IN_AUTOREFIT);
|
||||
LinkRefresher backup(*this);
|
||||
for (CargoID c = 0; c != NUM_CARGO; ++c) {
|
||||
if (CargoSpec::Get(c)->IsValid() && this->HandleRefit(c)) {
|
||||
if (!CargoSpec::Get(c)->IsValid()) continue;
|
||||
if (next->GetCargoLoadType(c) == OLFB_NO_LOAD) continue;
|
||||
if (this->HandleRefit(c)) {
|
||||
this->RefreshLinks(cur, next, travel, flags, num_hops);
|
||||
*this = backup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user