summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-10-03 17:22:09 +0000
committerfrosch <frosch@openttd.org>2011-10-03 17:22:09 +0000
commitfafa06e821d27eaa6345d8a043a4a21b7c6e6381 (patch)
tree8fad99ceaf5d07334ddbea28cb1526b09eee2cab /src/vehicle.cpp
parent68f969282e646b3fde7797a91beb3e38701564a6 (diff)
downloadopenttd-fafa06e821d27eaa6345d8a043a4a21b7c6e6381.tar.xz
(svn r22979) -Codechange: Add GroupStatistics::CountEngine().
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}