OpenTTD

Tasklist

FS#6006 - Vehicles no longer wait in stations

Attached to Project: OpenTTD
Opened by Simon Philips (sph) - Saturday, 03 May 2014, 15:04 GMT
Last edited by fonsinchen (fonsinchen) - Friday, 16 May 2014, 19:33 GMT
Type Bug
Category Vehicles
Status Confirmed   Reopened
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Steps to reproduce:

1) Build small track with two stations
2) Buy train, let it autofill
3) Set both station wait times to 10 days.

The wait time in the timetable is ignored and the vehicle departs immediately when it's done loading (which updates the scheduled times in the timetable). This not only makes timetables useless but also permanently ruins (previously) correct ones.

I've done some debug outputting and vehicle's current_order->wait_time outputs as 0 (while the wait_time is non-zero in the timetable gui). However, I haven't yet discovered why this happens.

This bug was introduced in (svn r26547) -Codechange: Collect order travel and wait times independent of timetables
The previous commit works fine.
This task depends upon

Comment by Alberth (Alberth) - Saturday, 03 May 2014, 16:06 GMT
Sounds like the the train is late. In that case it will not wait, but instead depart immediately to catch up.
Comment by Simon Philips (sph) - Saturday, 03 May 2014, 16:13 GMT
No it's not. I'll upload a savegame. Notice how the train's timetable updates at every visit, it simply ignores the wait time of 10 days. This is not the case in an earlier commit.
Comment by fonsinchen (fonsinchen) - Sunday, 11 May 2014, 09:32 GMT Comment by 3298 (3298) - Friday, 16 May 2014, 11:20 GMT
This issue seems to be not fixed entirely. Watch the timetable of the only vehicle in the attached save (a train with the orders: go to forest, go to sawmill, go to depot for servicing). The service interval is just over, so this time the train will go to the depot (instead of skipping the order like vehicles do on such orders when they need no service yet), which will set the travel time for that order (was 1 day, timetabled) to 10 days, not timetabled.
Edit (yes, finally found such a button...): Forgot to mention this is on r26588.
Comment by fonsinchen (fonsinchen) - Friday, 16 May 2014, 19:35 GMT
Yes, that's true. current_order becomes OT_DUMMY when the vehicle enters the depot in vehicle.cpp:1407 and then UpdateVehicleTimetable() doesn't see that it's timetabled.

Loading...