summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-10-03 17:22:56 +0000
committerfrosch <frosch@openttd.org>2011-10-03 17:22:56 +0000
commit5be8f732049daa97fd212ed9b91354d3b146d99d (patch)
tree95b0fbac40c2002c8fcc2225506b4ab4ef48ed55 /src/vehicle.cpp
parentfafa06e821d27eaa6345d8a043a4a21b7c6e6381 (diff)
downloadopenttd-5be8f732049daa97fd212ed9b91354d3b146d99d.tar.xz
(svn r22980) -Add: GroupStatistics for DEFAULT_GROUP.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index ca9f36c1b..9c362e448 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -694,11 +694,11 @@ void Vehicle::PreDestructor()
if (this->IsEngineCountable()) {
Company::Get(this->owner)->num_engines[this->engine_type]--;
- if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id);
-
- DeleteGroupHighlightOfVehicle(this);
GroupStatistics::CountEngine(this, -1);
if (this->IsPrimaryVehicle()) GroupStatistics::CountVehicle(this, -1);
+
+ if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id);
+ DeleteGroupHighlightOfVehicle(this);
}
if (this->type == VEH_AIRCRAFT && this->IsPrimaryVehicle()) {