diff options
author | glx <glx@openttd.org> | 2007-05-21 17:19:01 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-05-21 17:19:01 +0000 |
commit | bba732921f20dceca8441836ad413be45ede1279 (patch) | |
tree | 5c4787fc7b3d14bc175e4a1397fd30adc88e9da1 | |
parent | 7935cf77544b50d8d5defbbfebbcc706b8618d74 (diff) | |
download | openttd-bba732921f20dceca8441836ad413be45ede1279.tar.xz |
(svn r9896) -Fix (r9874): when selling an entire train, decrease the number of vehicles in the group only once
-rw-r--r-- | src/vehicle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f8c0ba4c5..b2bfecad7 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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); |