Codechange: rename next_station to next_hop to avoid confusing with another next_station

(cherry picked from commit 9f8c1ea552)
This commit is contained in:
Patric Stout
2023-09-10 22:33:33 +02:00
committed by Jonathan G Rennison
parent 2037587c7c
commit 4ee51442d2
4 changed files with 16 additions and 16 deletions

View File

@@ -167,7 +167,7 @@ bool CargoTransfer::operator()(CargoPacket *cp)
if (cp_new == nullptr) return false;
this->source->RemoveFromMeta(cp_new, VehicleCargoList::MTA_TRANSFER, cp_new->Count());
/* No transfer credits here as they were already granted during Stage(). */
this->destination->Append(cp_new, cp_new->GetNextStation());
this->destination->Append(cp_new, cp_new->GetNextHop());
return cp_new == cp;
}
@@ -218,8 +218,8 @@ bool VehicleCargoReroute::operator()(CargoPacket *cp, std::vector<CargoPacket *>
{
CargoPacket *cp_new = this->Preprocess(cp);
if (cp_new == nullptr) cp_new = cp;
if (cp_new->GetNextStation() == this->avoid || cp_new->GetNextStation() == this->avoid2) {
cp->SetNextStation(this->ge->GetVia(cp_new->GetFirstStation(), this->avoid, this->avoid2));
if (cp_new->GetNextHop() == this->avoid || cp_new->GetNextHop() == this->avoid2) {
cp->SetNextHop(this->ge->GetVia(cp_new->GetFirstStation(), this->avoid, this->avoid2));
}
if (unlikely(this->source != this->destination)) {
this->source->RemoveFromMeta(cp_new, VehicleCargoList::MTA_TRANSFER, cp_new->Count());