Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Question about weird branching conditions in can_overtake()

Started by Ranran, December 07, 2022, 11:04:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I am sorry to have to write such a complaint but THLeaderH has destroyed some overtaking features in extended. He's not going to deal with it. Because he recommends in his own video to merge the patch into stanrdard/extended to free himself from code maintenance. (However, IIRC James made a note that if you submit a patch, you basically have to do the maintenance yourself. The configuration of the board changed and I couldn't find it now...)

Especially his patch labeled as the bugfix on 2019 broke a lot. He completely disregarded the advice of Acarlotti and Turfit, causing their expected consequences. Unfortunately I don't have enough coding skills to deal with those issues. And addressing one bug can cause another. And above all, it is a huge black box.

Regarding one of the bugs, he made it impossible to overtake a bus that loading at a bus stop on a default road. Breaking basic functionality like this will only make players sad. And it has been broken for 3 years...
I checked the code to try to fix the problem.
He rewrote this line and broke the overtaking function of the bus stop in extended.
I found that reverting this code (same as standard) should fix this bug.
But here other_speed is always 0 because it inside if( other_speed == 0 ) {} also with standard.
So here it always evaluates tiles = 2, but THLeaderH did the opposite, then it looks like the overtaking function is broken.
Anyway, my point is this line (line 3691) of standard also looks weird, I mean, in standard sint32 tiles is always a constant of "2".
So I would appreciate it if you could confirm the intention or correct processing of this line.


Honestly, I do not know why this change was made in standard. Both values for 'tiles' look legit to me.
Parsley, sage, rosemary, and maggikraut.