summaryrefslogtreecommitdiff
path: root/src/depot.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-18 20:48:38 +0000
committerrubidium <rubidium@openttd.org>2010-08-18 20:48:38 +0000
commit926594b599e76886fd877e953036918687418b0c (patch)
treedb13aaa32a38c15aa14f64f4d01a0962889f9c0e /src/depot.cpp
parent04d6648c5efd89a32669a17d6ad2711c719820d9 (diff)
downloadopenttd-926594b599e76886fd877e953036918687418b0c.tar.xz
(svn r20547) -Change: the way order backups are performed. Now restoring an order doesn't require up to 765 commands.
Diffstat (limited to 'src/depot.cpp')
-rw-r--r--src/depot.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/depot.cpp b/src/depot.cpp
index f53a51ff0..039ab5b34 100644
--- a/src/depot.cpp
+++ b/src/depot.cpp
@@ -27,12 +27,14 @@ Depot::~Depot()
{
if (CleaningPool()) return;
+ /* Clear the order backup. */
+ OrderBackup::Reset(this->xy, false);
+
/* Clear the depot from all order-lists */
RemoveOrderFromAllVehicles(OT_GOTO_DEPOT, this->index);
/* Delete the depot-window */
DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);
- OrderBackup::Reset(this->xy);
/* Delete the depot list */
WindowNumber wno = (this->index << 16) | VLW_DEPOT_LIST | GetTileOwner(this->xy);