diff options
author | rubidium <rubidium@openttd.org> | 2009-10-18 17:26:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-10-18 17:26:10 +0000 |
commit | 62a6e9509b9067443899afcf8791e97d48aa8983 (patch) | |
tree | 4c288501328daf29cc914d608289b75efa642973 /src/station.cpp | |
parent | 41037308c09239e901c6160b31292af2eab2f918 (diff) | |
download | openttd-62a6e9509b9067443899afcf8791e97d48aa8983.tar.xz |
(svn r17804) -Codechange: move the CargoPacket 'invalidation' when stations get removed to CargoPacket.
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/station.cpp b/src/station.cpp index 1ac0341c0..ba0020c73 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -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); } |