Changeset - r21242:f9186ba6c34b
[Not reviewed]
master
0 1 0
fonsinchen - 10 years ago 2014-02-10 18:55:03
fonsinchen@openttd.org
(svn r26330) -Fix: the theoretical case of rerouting cargo from one VehicleCargoList to another.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/cargoaction.cpp
Show inline comments
 
@@ -224,8 +224,7 @@ bool VehicleCargoReroute::operator()(Car
 
	}
 
	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. */
0 comments (0 inline, 0 general)