(svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once
--- a/src/vehicle.cpp Mon May 21 16:58:23 2007 +0000
+++ b/src/vehicle.cpp Mon May 21 17:19:01 2007 +0000
@@ -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);