From 5be8f732049daa97fd212ed9b91354d3b146d99d Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 3 Oct 2011 17:22:56 +0000 Subject: (svn r22980) -Add: GroupStatistics for DEFAULT_GROUP. --- src/vehicle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vehicle.cpp') 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()) { -- cgit v1.2.3-54-g00ecf