The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: TurfIt on November 27, 2015, 12:11:33 AM

Title: Train ignores one way signal on tile with waypoint
Post by: TurfIt on November 27, 2015, 12:11:33 AM
The train in the screenshot proceeds northbound through the signal in the wrong direction to reach the waypoint at (47,46,-1).
Title: Re: Train ignores one way signal on tile with waypoint
Post by: Ters on November 27, 2015, 07:00:49 AM
This could actually serve a feature, even if it's rather non-obvious. Perhaps more so for no entry signs than normal signals, though, making it possible to restrict a shorter route to a few specific vehicles/lines by excluding everything by default and letting just them override the sign(al), rather than having to remember to route everything else around with waypoints or by using a non-natural distinction between electric trains and non-electric trains.
Title: Re: Train ignores one way signal on tile with waypoint
Post by: prissi on November 27, 2015, 11:10:50 PM
The reason is most likely the curve, as the route finder goes backwards to find the route. I guess there is a bug lingering for the last tile. (Also I would guess this issue is older.)
Title: Re: Train ignores one way signal on tile with waypoint
Post by: Dwachs on January 04, 2016, 09:58:07 AM
tried to fix this in r 7712.

@Ters: this did not serve as hidden feature. As soon as the train reaches the tile with the signal and waypoint, it turns back, leaving the tile through the direction admitted by the signal.
Title: Re: Train ignores one way signal on tile with waypoint
Post by: TurfIt on January 05, 2016, 01:21:24 AM
Might this affect the behaviour of signals on junctions?
I realized later this 'bug' is more working as designed - a consequence of signals controlling the exit of a tile, not the entrance. But I'll admit it's confusing since it even got me!
Title: Re: Train ignores one way signal on tile with waypoint
Post by: Ters on January 05, 2016, 06:38:43 AM
Signals on junctions is a bug in the first place, isn't it? You can't build them there directly.
Title: Re: Train ignores one way signal on tile with waypoint
Post by: Dwachs on January 05, 2016, 06:04:22 PM
@Turfit: there was already a semi-fix in the code. It prevented entering tiles with straight track and signal from the wrong direction. The commit r7712 also prevents this for signal and waypoint on a curve. I did not check what this means for signals on junctions. As there are now more cases, where entering a tile is considered forbidden now, this might affect signals on junctions as well.
Title: Re: Train ignores one way signal on tile with waypoint
Post by: TurfIt on January 06, 2016, 02:48:54 AM
The original problem is fixed. There is also no apparent impact to signals on junctions.