OpenTTD

Tasklist

FS#1105 - Group vehicles counted twice after auto replace

Attached to Project: OpenTTD
Opened by Chris (Chris) - Sunday, 05 August 2007, 12:27 GMT
Type Bug
Category Vehicles → Autoreplace
Status Closed
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I know the screenshot shows that the bug happened in ChrisIN, but it can be reproduced with trunk and any ChrisIN version. The problem is, that each time I click the Manage list dropdown choose autoreplace and replace vehicles the group vehicle count won't stay the same but instead will count the old vehicles (which don't exist anymore) plus the new ones. That's definitely a bug :)
This task depends upon

Closed by  Remko Bijker (Rubidium)
Sunday, 05 August 2007, 17:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r10798.
Comment by Chris (Chris) - Sunday, 05 August 2007, 12:38 GMT
Hmmm, something seems broken. Now I just deleted all my groups and when I choose All Trains/Ungrouped trains > Manage List > Replaced Vehicles there are two types shown which I don't even have with astronomous numbers and additionally the BR116 and BR152 I have isn't shown at all :(
Comment by Chris (Chris) - Sunday, 05 August 2007, 12:40 GMT
P.S. I never even built the BR92 shown in another bug.jpg, the VT137 from the second picture is not used anymore at all and was replaced by BR01 and then BR05.
Comment by Chris (Chris) - Sunday, 05 August 2007, 12:57 GMT
Ok, just created a trunk r10791 game and the problem happens there too as expected (since ChrisIN doesn't change the groups or autoreplace code and nothing related to it). See attached savegames.

Reproduce like this:
1) Build track stations, 4 trains
2) Create Group TEST and add the 4 trains from the track
3) Replace any locomotive by another and group vehicle count will double (increase by the amount of vehicles replaced)
4) Repeat as often as you want and group vehicle count continues to increase by the number of vehicles replaced

The problem as shown in another bug and another bug2 couldn't be quickly reproduced in a newly started game, but that issue is probably due to something got messed up since I had a lot more groups and vehicles in my real game.

Loading...