You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Too fast trains, which added or replaced by newGRF, are has a problem about arriving station.
Cause of this problem is OpenTTD doesn't check train is appropriately matched with the station, in 1 tick.
In other words, cause of this problem is arrival check occured tick-by-tick, not tile-by-tile.
This problem bring on unmatched arrival of "too" fast train. So they couldn't process any load or unload task.
It occured speed of train over about 2,000 km. And due to its distance between station or snaped track, it could raises randomly but not at all.
To raise this problem by intent, add any GRFs which has over 3K speed and make the track to trains are could speed-up their maximum speed.
I solved this problem with fix some line of source code.
TrainLocoHandler() in train_cmd.cpp, there is a part for advance train on real track. About 100 lines below of start of function.
And there is a function invoking, which determines train could move next tile or not. Named TrainController().
But that hasn't a return value for use in other functions. So I tried to change this function to return some value, which it could move or not.
Especially it returns FALSE when the checking train is successfully entered to the station.
And I changed also TrainLocoHandler() to get return value of TrainController(), and If they couldn't go anymore cause train successfully entered to the station,
Then TrainLocoHandler() stops this train immediately.
This fix works pretty well. And it successfully stopping train even they has a 'massive' speed amount like over 10,000 km.
I couldn't found this fix occurs another problem. But maybe there is a bug that I don't know.
Please check this problem. And I hope this is some problem, not intended.
Thank you for reading. My English is not good. So I worried about anyone couldn't know what I want to say.
BizNoK opened the ticket and wrote:
Reported version: 0.7.0
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/2824
The text was updated successfully, but these errors were encountered: