Mercurial > hg > openttd
diff src/vehicle.cpp @ 6665:d0ccddda7bf9 draft
(svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once
author | glx <glx@openttd.org> |
---|---|
date | Mon, 21 May 2007 17:19:01 +0000 |
parents | 7414b00efba4 |
children | 6984c0dbbb07 |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -585,7 +585,7 @@ 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);