News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

A privatecar can't overtake even very slow privatecar :(

Started by Ranran, January 15, 2022, 01:19:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

It is well known that carriages in the era of carriage-to-automobile transitions are very disturbing in simutrans.
Player-owned cars can overtake slow carriages, but private cars cannot.





For example, when the private horse, privatecar, players convoy are lined up in that order, the convoy cannot overtake the privatecar in front of it, so it has to run at the same speed as the slow private horse until they are gone...

(´・ω・`)WTF... なんてこったい

I think it's a bug that a fast enough privatecar can't overtake a slow privatecar(**** horse).

jamespetts

This is rather odd. I do not know the overtaking code well as I did not write it. Can you upload this saved game to save me time when I look into this? Thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran


Ranran

I think I've fixed this bug. Please check the pull request #476.
However, please note that the overtaking code is complex and I am not an expert in it.

As far as I checked, the privatecar overtaking algorithm was broken as of Extended14.5 (#afb863d) 4/7/2019. Earlier versions have not been checked.
Then in July 2020 I made an error in my code change when I reduced the overtaking mode, but regardless, overtaking was impossible. After sidling up to overtake, the overtaking will fail because can_enter_tile returns false. In other words, it will stop because it cannot change the driving lane.
It should be noted that while THleaderH has made many modifications to his own fork, he has not done any maintenance on extended. Checking for code diffs is a lot of work. (´・ω・`)

jamespetts

Excellent, thank you very much for this: now incorporated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.