mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once
This commit is contained in:
parent
d836b25606
commit
0646d307bd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user