(svn r22976) -Codechange: Split group statistics into separate struct.

This commit is contained in:
frosch
2011-10-03 17:20:26 +00:00
parent 7133887ed6
commit b6766c2ed5
5 changed files with 48 additions and 23 deletions

View File

@@ -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)->num_engines[this->engine_type]--;
if (Group::IsValidID(this->group_id)) Group::Get(this->group_id)->statistics.num_engines[this->engine_type]--;
if (this->IsPrimaryVehicle()) DecreaseGroupNumVehicle(this->group_id);
}