summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2014-02-10 18:55:03 +0000
committerfonsinchen <fonsinchen@openttd.org>2014-02-10 18:55:03 +0000
commit82ece7db12f4cd7d56ddbe3414a0553f636d4259 (patch)
tree7c1a7353eab1879effa972e834df5cc5254c9e2c
parent4f24e33548ac3e6618f33f6433d8fe276c3594d5 (diff)
downloadopenttd-82ece7db12f4cd7d56ddbe3414a0553f636d4259.tar.xz
(svn r26330) -Fix: the theoretical case of rerouting cargo from one VehicleCargoList to another.
-rw-r--r--src/cargoaction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cargoaction.cpp b/src/cargoaction.cpp
index 929017506..48c49e99f 100644
--- a/src/cargoaction.cpp
+++ b/src/cargoaction.cpp
@@ -224,8 +224,7 @@ bool VehicleCargoReroute::operator()(CargoPacket *cp)
}
if (this->source != this->destination) {
this->source->RemoveFromMeta(cp_new, VehicleCargoList::MTA_TRANSFER, cp_new->Count());
- this->source->AddToMeta(cp_new, VehicleCargoList::MTA_TRANSFER);
- this->destination->action_counts[VehicleCargoList::MTA_TRANSFER] += cp_new->Count();
+ this->destination->AddToMeta(cp_new, VehicleCargoList::MTA_TRANSFER);
}
/* Legal, as front pushing doesn't invalidate iterators in std::list. */