(svn r22978) -Codechange: Replace IncreaseGroupNumVehicle() and DecreaseGroupNumVehicle() with GroupStatistics::CountVehicle().

This commit is contained in:
frosch
2011-10-03 17:21:41 +00:00
parent b78a459613
commit 68f969282e
4 changed files with 59 additions and 30 deletions

View File

@@ -698,7 +698,7 @@ void Vehicle::PreDestructor()
DeleteGroupHighlightOfVehicle(this);
if (Group::IsValidID(this->group_id)) Group::Get(this->group_id)->statistics.num_engines[this->engine_type]--;
if (this->IsPrimaryVehicle()) DecreaseGroupNumVehicle(this->group_id);
if (this->IsPrimaryVehicle()) GroupStatistics::CountVehicle(this, -1);
}
if (this->type == VEH_AIRCRAFT && this->IsPrimaryVehicle()) {