News:

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

Pull request: trains immediately un-request level crossings

Started by freddyhayward, January 21, 2021, 02:48:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freddyhayward

This pull request (https://github.com/jamespetts/simutrans-extended/pull/348) fixes an issue where trains would immediately un-request level crossings, forcing them to wait for several minutes, sometimes indefinitely, for cars to pass through. It does this by removing one block of code originally added in a bug fix from 2016 that aimed to prevent trains from incorrectly reserving level crossings (https://github.com/jamespetts/simutrans-extended/commit/7cbfbe4721f1d0ba0ca360b28ce6083755857d1c). That commit changed the code in many places, so it is likely that it functions correctly without the removed section - but I unfortunately cannot confirm this. In my opinion, the bug that removing that block of code fixes significantly affects gameplay, so the fix should be merged and we should observe whether it re-introduces incorrect reservations.

jamespetts

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.

freddyhayward

Unfortunately, this has caused disruptive behaviour to all diagonal level crossings where cars are trapped inside preventing trains from crossing at all. While these were never an intended feature and could be considered bugs or exploits themselves, they are extensively featured in bridgewater-brunel.

jamespetts

Thank you for letting me know - now reverted.

I should note that what applies to diagonal level crossings may well also apply to level crossings of double track lines when two trains are passing at once.
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.

freddyhayward

Quote from: jamespetts on January 22, 2021, 09:33:22 AMI should note that what applies to diagonal level crossings may well also apply to level crossings of double track lines when two trains are passing at once.
The issue with diagonal crossings is that cars must traverse several independently operating crossings. Perpendicular crossings of any size do not have this problem because the entire crossing is operated as one. This problem could conceivably be fixed by allowing diagonal crossings to form, but it is only worth doing if it is decided that diagonal crossings are worth supporting in the long-term. In my opinion, they are.

jamespetts

Quote from: freddyhayward on January 22, 2021, 09:49:04 AM
The issue with diagonal crossings is that cars must traverse several independently operating crossings. Perpendicular crossings of any size do not have this problem because the entire crossing is operated as one. This problem could conceivably be fixed by allowing diagonal crossings to form, but it is only worth doing if it is decided that diagonal crossings are worth supporting in the long-term. In my opinion, they are.

Another feature to join the ever growing list of things that, all other things being equal, it would be good to have one day...
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.

freddyhayward

Quote from: jamespetts on January 22, 2021, 09:50:55 AMAnother feature to join the ever growing list of things that, all other things being equal, it would be good to have one day...
In that case, would you mind if I set out to accommodate diagonal crossings in the crossing code? The more challenging part (graphics), can come later.

jamespetts

Quote from: freddyhayward on January 22, 2021, 09:54:14 AM
In that case, would you mind if I set out to accommodate diagonal crossings in the crossing code? The more challenging part (graphics), can come later.

I certainly do not mind, but I cannot commit any time to producing graphics for this in the foreseeable future.
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.