(svn r17804) -Codechange: move the CargoPacket 'invalidation' when stations get removed to CargoPacket.

This commit is contained in:
rubidium
2009-10-18 17:26:10 +00:00
parent 0557a47162
commit 8234230f9e
3 changed files with 14 additions and 5 deletions

View File

@@ -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);
}