(svn r22980) -Add: GroupStatistics for DEFAULT_GROUP.

This commit is contained in:
frosch
2011-10-03 17:22:56 +00:00
parent fafa06e821
commit 5be8f73204
6 changed files with 46 additions and 28 deletions

View File

@@ -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()) {