(svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once

This commit is contained in:
glx 2007-05-21 17:19:01 +00:00
parent d836b25606
commit 0646d307bd
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ void DestroyVehicle(Vehicle *v)
if (v->owner == _local_player) InvalidateAutoreplaceWindow(v->engine_type);
if (IsValidGroupID(v->group_id)) GetGroup(v->group_id)->num_engines[v->engine_type]--;
DecreaseGroupNumVehicle(v->group_id);
if (v->type != VEH_TRAIN || IsFrontEngine(v)) DecreaseGroupNumVehicle(v->group_id);
}
DeleteVehicleNews(v->index, INVALID_STRING_ID);