(svn r17804) -Codechange: move the CargoPacket 'invalidation' when stations get removed to CargoPacket.
This commit is contained in:
@@ -97,11 +97,7 @@ Station::~Station()
|
||||
this->goods[c].cargo.Truncate(0);
|
||||
}
|
||||
|
||||
CargoPacket *cp;
|
||||
FOR_ALL_CARGOPACKETS(cp) {
|
||||
/* Don't allow cargo packets with invalid source station */
|
||||
if (cp->source == this->index) cp->source = INVALID_STATION;
|
||||
}
|
||||
CargoPacket::InvalidateAllFrom(this->index);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user