From fafa06e821d27eaa6345d8a043a4a21b7c6e6381 Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 3 Oct 2011 17:22:09 +0000 Subject: (svn r22979) -Codechange: Add GroupStatistics::CountEngine(). --- src/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 731c31395..ca9f36c1b 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -697,7 +697,7 @@ void Vehicle::PreDestructor() if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id); DeleteGroupHighlightOfVehicle(this); - if (Group::IsValidID(this->group_id)) Group::Get(this->group_id)->statistics.num_engines[this->engine_type]--; + GroupStatistics::CountEngine(this, -1); if (this->IsPrimaryVehicle()) GroupStatistics::CountVehicle(this, -1); } -- cgit v1.2.3-54-g00ecf