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

This commit is contained in:
Patric Stout
2023-09-10 22:33:33 +02:00
committed by Patric Stout
parent a0f6983be4
commit 9f8c1ea552
3 changed files with 15 additions and 15 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;
}
@@ -217,8 +217,8 @@ bool VehicleCargoReroute::operator()(CargoPacket *cp)
{
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 (this->source != this->destination) {
this->source->RemoveFromMeta(cp_new, VehicleCargoList::MTA_TRANSFER, cp_new->Count());